14844 Commits

Author SHA1 Message Date
Dmitriy Ivanov
ffcd909534 am 12ca831b: Merge "Hide __atexit"
* commit '12ca831b0e03e85a2f5588bdf834dc6046d1ac6c':
  Hide __atexit
2015-06-04 22:14:01 +00:00
Dmitriy Ivanov
c534603f8d Hide __atexit
Bug: http://b/21640806
Change-Id: I778b35c8c7538859179e97fcf5a82db2fcd9e50f
(cherry picked from commit 9cf6fc304bbbfb26911e0b624b80d862c40b0308)
2015-06-04 14:51:26 -07:00
Dmitriy Ivanov
12ca831b0e Merge "Hide __atexit" 2015-06-04 21:50:05 +00:00
Dmitriy Ivanov
9cf6fc304b Hide __atexit
Bug: http://b/21640806
Change-Id: I778b35c8c7538859179e97fcf5a82db2fcd9e50f
2015-06-04 14:33:18 -07:00
Christopher Ferris
16c64d4aa1 am b68b8b4b: Merge "Reorder DIR structure due to bad apps."
* commit 'b68b8b4b95d3e373a8975c0b650cde4d348ff118':
  Reorder DIR structure due to bad apps.
2015-06-04 21:30:25 +00:00
Christopher Ferris
699df5ca48 am f2e86cd9: Merge "Reorder DIR structure due to bad apps." into mnc-dev
* commit 'f2e86cd98038d6239265d936c32774b7289bfdc7':
  Reorder DIR structure due to bad apps.
2015-06-04 21:22:41 +00:00
Christopher Ferris
b68b8b4b95 Merge "Reorder DIR structure due to bad apps." 2015-06-04 21:06:23 +00:00
Christopher Ferris
c062218a9b Reorder DIR structure due to bad apps.
It turns out that apportable apps expect that the DIR structure is
the same as in L and below. Modify the structure to have the same
order, and move the new variable to the end of the structure.

Bug: 21037208
(cherry picked from commit 5edb0f40f654c804d38f1bff43f91719e189c892)

Change-Id: I0c1ab5e295ec8bef638daa4cfea5830aeea602e6
2015-06-04 14:04:16 -07:00
Christopher Ferris
f2e86cd980 Merge "Reorder DIR structure due to bad apps." into mnc-dev 2015-06-04 20:57:57 +00:00
Christopher Ferris
5edb0f40f6 Reorder DIR structure due to bad apps.
It turns out that apportable apps expect that the DIR structure is
the same as in L and below. Modify the structure to have the same
order, and move the new variable to the end of the structure.

Bug: 21037208
Change-Id: Id1258e9dc19423109a2c3a8086d3022965591166
2015-06-04 13:30:45 -07:00
Dmitriy Ivanov
c677d69258 am 34de7f84: Strip version info when extracting symbols
* commit '34de7f849799ea47534d617595ab566690a16f2f':
  Strip version info when extracting symbols
2015-06-04 19:22:21 +00:00
Dmitriy Ivanov
2706592b24 am 5cce2e72: Merge "Strip version info when extracting symbols"
* commit '5cce2e7205c92e6c4199dc5f4155e003f0a5b832':
  Strip version info when extracting symbols
2015-06-04 19:00:32 +00:00
Dmitriy Ivanov
34de7f8497 Strip version info when extracting symbols
Bug: http://b/20139821
Change-Id: I1c1ed1b97a75936407e996698b98b94a7175ac30
(cherry picked from commit 6cda0742895e46aa4ad0e4e8d5637d166f9f46f2)
2015-06-04 11:15:13 -07:00
Dmitriy Ivanov
5cce2e7205 Merge "Strip version info when extracting symbols" 2015-06-04 18:06:03 +00:00
Dmitriy Ivanov
6cda074289 Strip version info when extracting symbols
Bug: http://b/20139821
Change-Id: I1c1ed1b97a75936407e996698b98b94a7175ac30
2015-06-04 17:56:02 +00:00
Dmitriy Ivanov
9fbb73352d am 0c29aaba: Merge "Backward compatibility for dlsym(RTLD_DEFAULT, ...)" into mnc-dev
* commit '0c29aabad25832ec249288c8da3cf080c898ba74':
  Backward compatibility for dlsym(RTLD_DEFAULT, ...)
2015-06-03 02:22:59 +00:00
Dmitriy Ivanov
61e327fdf5 am 3931b6d9: Merge "Backward compatibility for dlsym(RTLD_DEFAULT, ...)"
* commit '3931b6d9b37a47e0921e329ff5846b7fd21cdd7b':
  Backward compatibility for dlsym(RTLD_DEFAULT, ...)
2015-06-03 01:31:48 +00:00
Dmitriy Ivanov
3931b6d9b3 Merge "Backward compatibility for dlsym(RTLD_DEFAULT, ...)" 2015-06-03 01:11:12 +00:00
Dmitriy Ivanov
0c29aabad2 Merge "Backward compatibility for dlsym(RTLD_DEFAULT, ...)" into mnc-dev 2015-06-03 01:09:34 +00:00
Dmitriy Ivanov
1913352c6b 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
(cherry picked from commit 04f7e3e955ba7de5f449c995e667659319dc1cce)
2015-06-02 18:09:23 -07:00
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