Dmitriy Ivanov
04f7e3e955
Backward compatibility for dlsym(RTLD_DEFAULT, ...)
...
Do not skip RTLD_LOCAL libraries in dlsym(RTLD_DEFAULT, ...)
if the library is opened by application with target api level <= 22
Bug: http://b/21565766
Bug: http://b/17512583
Change-Id: Ic45ed1e4f53e84cba9d74cab6b0049c0c7aa8423
2015-06-02 18:06:24 -07:00
Yabin Cui
61b040a570
resolved conflicts for merge of ea248d9c to lmp-mr1-ub-dev
...
Change-Id: I362ab2e25e3368c71cb1af51cee2e8fb5ce53e61
2015-06-02 16:47:42 -07:00
Nick Kralevich
e587e0c92a
am f56bad97: Merge "libc: Add O_PATH support for fgetxattr / fsetxattr" into mnc-dev
...
* commit 'f56bad974bced86671030b13d99f8ec2f497521e':
libc: Add O_PATH support for fgetxattr / fsetxattr
2015-06-02 22:21:20 +00:00
Yabin Cui
ea248d9ca8
Merge "Make sys_resource test more robust." into lollipop-cts-dev
...
automerge: 492a0bf
* commit '492a0bf212973baa1c33d584d57e75395774447f':
Make sys_resource test more robust.
2015-06-02 22:03:23 +00:00
Nick Kralevich
f56bad974b
Merge "libc: Add O_PATH support for fgetxattr / fsetxattr" into mnc-dev
2015-06-02 22:02:43 +00:00
Yabin Cui
492a0bf212
Merge "Make sys_resource test more robust." into lollipop-cts-dev
android-cts-5.0_r3
2015-06-02 22:02:29 +00:00
Yabin Cui
e7ece90b50
Make sys_resource test more robust.
...
Bug: 19482626
"ulimit -c xxx" command may run before bionic-unit-tests.
Make sure sys_resource test fails gently in that case.
Change-Id: Ic3b5ed8b20acba56df8c5ef082c88e5050e761aa
(cherry picked from commit 4853f40f3fb6664cb1b7af97b6b3e795717026b1)
2015-06-02 14:40:26 -07:00
Dmitriy Ivanov
27b002baef
am 11b15b23: Merge "Work around for libraries without dt_soname"
...
* commit '11b15b23aa6044b1fa2ce89744643a0cc072b348':
Work around for libraries without dt_soname
2015-06-02 21:30:54 +00:00
Dmitriy Ivanov
719278b5e4
am 38c37d67: Work around for libraries without dt_soname
...
* commit '38c37d6705f420ecac4146c11d79bee6e0ca8a03':
Work around for libraries without dt_soname
2015-06-02 21:30:11 +00:00
Dmitriy Ivanov
11b15b23aa
Merge "Work around for libraries without dt_soname"
2015-06-02 21:09:41 +00:00
Dmitriy Ivanov
75108f4f83
Work around for libraries without dt_soname
...
Applies only for apps targeting sdk version <= 22
Bug: http://b/21565766
Change-Id: If0bf2229dc1341e9ca09f9a05d0890515273d5a2
(cherry picked from commit 38c37d6705f420ecac4146c11d79bee6e0ca8a03)
2015-06-02 14:02:22 -07:00
Dmitriy Ivanov
38c37d6705
Work around for libraries without dt_soname
...
Applies only for apps targeting sdk version <= 22
Bug: http://b/21565766
Change-Id: If0bf2229dc1341e9ca09f9a05d0890515273d5a2
2015-06-02 13:45:15 -07:00
Nick Kralevich
c92f9f8069
libc: Add O_PATH support for fgetxattr / fsetxattr
...
Support O_PATH file descriptors when handling fgetxattr and fsetxattr.
This avoids requiring file read access to pull extended attributes.
This is needed to support O_PATH file descriptors when calling
SELinux's fgetfilecon() call. In particular, this allows the querying
and setting of SELinux file context by using something like the following
code:
int dirfd = open("/path/to/dir", O_DIRECTORY);
int fd = openat(dirfd, "file", O_PATH | O_NOFOLLOW);
char *context;
fgetfilecon(fd, &context);
This change was motivated by a comment in
https://android-review.googlesource.com/#/c/152680/1/toys/posix/ls.c
(cherrypicked from commit 2825f10b7f61558c264231a536cf3affc0d84204)
Change-Id: Ic0cdf9f9dd0e35a63b44a4c4a08400020041eddf
2015-06-02 10:08:05 -07:00
Dmitriy Ivanov
8d67a598c5
am c4ebe60e: Fix dlsym(handle_of_main_executable, ...)
...
* commit 'c4ebe60e1a2fc165ff11442765325628e27f2a05':
Fix dlsym(handle_of_main_executable, ...)
2015-06-02 14:22:58 +00:00
Dmitriy Ivanov
4af36c8d99
am ef55f967: Merge "Fix dlsym(handle_of_main_executable, ...)"
...
* commit 'ef55f967234f160a4e00a51ca53377fadd17715d':
Fix dlsym(handle_of_main_executable, ...)
2015-06-02 00:11:05 +00:00
Dmitriy Ivanov
c4ebe60e1a
Fix dlsym(handle_of_main_executable, ...)
...
According to man dlopen(3) and posix docs in the case when si is handle
of the main executable we need to search not only in the executable and its
dependencies but also in all libraries loaded with RTLD_GLOBAL.
see also: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlopen.html
Bug: http://b/21528224
Bug: http://b/17512583
Bug: https://code.google.com/p/android/issues/detail?id=173822
Change-Id: Ib2801367ba48b6f3704da89a6d9f5e6911430013
(cherry picked from commit f439b5a3186ca0fef1092f45770abc716da9d87a)
2015-06-01 16:57:33 -07:00
Dmitriy Ivanov
ef55f96723
Merge "Fix dlsym(handle_of_main_executable, ...)"
2015-06-01 23:51:24 +00:00
Nick Kralevich
1c9347866f
am e7deb145: Merge "libc: Add O_PATH support for fgetxattr / fsetxattr"
...
* commit 'e7deb145c66cc3434bf0f499de20b2c9d66cb2db':
libc: Add O_PATH support for fgetxattr / fsetxattr
2015-06-01 23:42:37 +00:00
Dan Albert
0c4314b658
am c5e02eeb: Cleanup ftruncate negative test.
...
* commit 'c5e02eeb353c3cdd357413f563701d5018fc76a5':
Cleanup ftruncate negative test.
2015-06-01 23:21:38 +00:00
Dan Albert
654c28e0a3
am 5f3e19db: (-s ours) Fix error handling for negative size in ftruncate.
...
* commit '5f3e19dbbeb851fff5cf7f9869d344feca479413':
Fix error handling for negative size in ftruncate.
2015-06-01 23:21:37 +00:00
Nick Kralevich
e7deb145c6
Merge "libc: Add O_PATH support for fgetxattr / fsetxattr"
2015-06-01 23:16:14 +00:00
Nick Kralevich
2825f10b7f
libc: Add O_PATH support for fgetxattr / fsetxattr
...
Support O_PATH file descriptors when handling fgetxattr and fsetxattr.
This avoids requiring file read access to pull extended attributes.
This is needed to support O_PATH file descriptors when calling
SELinux's fgetfilecon() call. In particular, this allows the querying
and setting of SELinux file context by using something like the following
code:
int dirfd = open("/path/to/dir", O_DIRECTORY);
int fd = openat(dirfd, "file", O_PATH | O_NOFOLLOW);
char *context;
fgetfilecon(fd, &context);
This change was motivated by a comment in
https://android-review.googlesource.com/#/c/152680/1/toys/posix/ls.c
Change-Id: Ic0cdf9f9dd0e35a63b44a4c4a08400020041eddf
2015-06-01 15:51:56 -07:00
Dmitriy Ivanov
f439b5a318
Fix dlsym(handle_of_main_executable, ...)
...
According to man dlopen(3) and posix docs in the case when si is handle
of the main executable we need to search not only in the executable and its
dependencies but also in all libraries loaded with RTLD_GLOBAL.
see also: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlopen.html
Bug: http://b/21528224
Bug: http://b/17512583
Bug: https://code.google.com/p/android/issues/detail?id=173822
Change-Id: Ib2801367ba48b6f3704da89a6d9f5e6911430013
2015-06-01 14:33:43 -07:00
Dan Albert
944d901cfd
am ef607cda: Merge "Cleanup ftruncate negative test."
...
* commit 'ef607cdae24363c5e6b6fc72607a4cff78623851':
Cleanup ftruncate negative test.
2015-06-01 20:45:10 +00:00
Dan Albert
c5e02eeb35
Cleanup ftruncate negative test.
...
Addresses post-submit comments from
I54692ab8105dd09db6af7a2c0894a17bdd118aa0.
Bug: http://b/21309901
Change-Id: Ie19ee8cdcc4055a65fe7dfc103156e54eafe8977
(cherry picked from commit 9d476a02e9a14e847669a6683c585028175aa322)
2015-06-01 13:24:36 -07:00
Dan Albert
ef607cdae2
Merge "Cleanup ftruncate negative test."
2015-06-01 20:24:15 +00:00
Dan Albert
9d476a02e9
Cleanup ftruncate negative test.
...
Addresses post-submit comments from
I54692ab8105dd09db6af7a2c0894a17bdd118aa0.
Bug: http://b/21309901
Change-Id: Ie19ee8cdcc4055a65fe7dfc103156e54eafe8977
2015-06-01 13:22:57 -07:00
Dan Albert
5f3e19dbbe
Fix error handling for negative size in ftruncate.
...
Bug: 21309901
Change-Id: I54692ab8105dd09db6af7a2c0894a17bdd118aa0
(cherry picked from commit c05554ec5c9aff5e0f1e83de9bb62c3569eecca2)
2015-06-01 11:28:13 -07:00
Elliott Hughes
a673ad06c8
am d7089168: Merge "[MIPS] Do not use compact branches until GDB supports them"
...
* commit 'd70891687d742414d457e41a998726e5eb0a09bd':
[MIPS] Do not use compact branches until GDB supports them
2015-05-29 05:01:57 +00:00
Elliott Hughes
d70891687d
Merge "[MIPS] Do not use compact branches until GDB supports them"
2015-05-29 04:39:24 +00:00
Dmitriy Ivanov
e5744bb553
am 55115510: Merge "Improve some of error/warning messages"
...
* commit '5511551009c5b8b7495af8278ffe914d4a8147b1':
Improve some of error/warning messages
2015-05-29 00:04:53 +00:00
Dmitriy Ivanov
d5dd23ad09
am 6c2dba86: Merge "Work around incorrect dt_needed entries"
...
* commit '6c2dba8651f8cf9e406a5c7879fbaee1b0f29980':
Work around incorrect dt_needed entries
2015-05-29 00:04:52 +00:00
Dmitriy Ivanov
9843fdd82b
am ca10ac6d: Improve some of error/warning messages
...
* commit 'ca10ac6dd45f73752e8822fee606d83116a5721a':
Improve some of error/warning messages
2015-05-28 23:29:27 +00:00
Dmitriy Ivanov
87298989ea
am 4a7c3af0: Work around incorrect dt_needed entries
...
* commit '4a7c3af054fdb525c8e458434f57f20696f43e31':
Work around incorrect dt_needed entries
2015-05-28 23:29:26 +00:00
Dmitriy Ivanov
ca10ac6dd4
Improve some of error/warning messages
...
Bug: http://b/20464031
Change-Id: I948141c46f9e054fc45f5934153dee56ce3cd558
(cherry picked from commit 087005f37e02b48809746947159d824493885b1e)
2015-05-28 15:28:41 -07:00
Dmitriy Ivanov
5511551009
Merge "Improve some of error/warning messages"
2015-05-28 22:28:13 +00:00
Dmitriy Ivanov
4a7c3af054
Work around incorrect dt_needed entries
...
This applies for apps targeting sdk<=22 and
only for lp32 platforms.
Bug: http://b/21364029
Change-Id: I903e81c9ccda2a8beaba1d132d68c77d30a4cdb2
(cherry picked from commit d974e8804689058714dc4fe9adcb57ee9a6996a8)
2015-05-28 15:25:55 -07:00
Dmitriy Ivanov
6c2dba8651
Merge "Work around incorrect dt_needed entries"
2015-05-28 22:25:15 +00:00
Dmitriy Ivanov
d974e88046
Work around incorrect dt_needed entries
...
This applies for apps targeting sdk<=22 and
only for lp32 platforms.
Bug: http://b/21364029
Change-Id: I903e81c9ccda2a8beaba1d132d68c77d30a4cdb2
2015-05-28 14:56:42 -07:00
Dmitriy Ivanov
087005f37e
Improve some of error/warning messages
...
Bug: http://b/20464031
Change-Id: I948141c46f9e054fc45f5934153dee56ce3cd558
2015-05-28 11:44:31 -07:00
Dmitriy Ivanov
656d176157
am d8ead181: Add functions to provide target sdk version
...
* commit 'd8ead18145cba98fdc7256f9a0e69b8c1c90cd1c':
Add functions to provide target sdk version
2015-05-27 23:50:05 +00:00
Dmitriy Ivanov
d8ead18145
Add functions to provide target sdk version
...
Bug: http://b/21364029
Change-Id: I8648d1bff6c8fd6e7cd12da7f128e048b9f2829a
(cherry picked from commit 79fd668bb4ddb22432eeda2ebd8d10359013d9a8)
2015-05-27 16:20:16 -07:00
Dmitriy Ivanov
80eded99d3
am d717b1a3: Merge "Add functions to provide target sdk version"
...
* commit 'd717b1a3e55db9b7625a46bec950e856cc107951':
Add functions to provide target sdk version
2015-05-27 23:14:48 +00:00
Dmitriy Ivanov
d717b1a3e5
Merge "Add functions to provide target sdk version"
android-m-preview
2015-05-27 22:44:28 +00:00
Dmitriy Ivanov
79fd668bb4
Add functions to provide target sdk version
...
Bug: http://b/21364029
Change-Id: I8648d1bff6c8fd6e7cd12da7f128e048b9f2829a
2015-05-27 14:31:36 -07:00
Simon Baldwin
6fbb7cf4a9
am 560aacee: Merge "Fix unit tests, and extend for other architectures"
...
* commit '560aacee84ecfd1aa8983d0ab58b81fbbe34911d':
Fix unit tests, and extend for other architectures
2015-05-27 17:09:45 +00:00
Simon Baldwin
560aacee84
Merge "Fix unit tests, and extend for other architectures"
2015-05-27 16:42:38 +00:00
Simon Baldwin
1011e1a402
Fix unit tests, and extend for other architectures
...
On unpacking, reinstate any p_align values that packing reduced to
page size. Ensures a round-trip pack and unpack is bit-equivalent
to the original input.
https://android-review.googlesource.com/#/c/148492/
Extend unit tests to include ia32, x64, and mips32.
Recreate test data for arm32 and arm64. Generate new test data for
ia32, x64, and mips32.
Bug: http://b/20687795
Bug: http://b/18051137
Change-Id: Ifbca8e206ef447297ba4f19272b813702be27a35
2015-05-27 13:20:00 +01:00
Dmitriy Ivanov
68da29608b
am fad15145: Merge "Remove LOCAL_CONLY_FLAGS it is no-op."
...
* commit 'fad15145f8ee28be45cf2c870d3b87f22a2f07c3':
Remove LOCAL_CONLY_FLAGS it is no-op.
2015-05-26 21:21:30 +00:00
Dmitriy Ivanov
fad15145f8
Merge "Remove LOCAL_CONLY_FLAGS it is no-op."
2015-05-26 20:56:37 +00:00