14423 Commits

Author SHA1 Message Date
Elliott Hughes
7efad83d43 Ensure __set_errno is still visible on LP32.
The use of the .hidden directive to avoid going via the PLT for
__set_errno had the side-effect of actually making __set_errno
hidden (which is odd because assembler directives don't usually
affect symbols defined in a different file --- you can't even
create a weak reference to a symbol that's defined in a different
file).

This change switches the system call stubs over to a new always-hidden
__set_errno_internal and has a visible __set_errno on LP32 just for
binary compatibility with old NDK apps.

Bug: 17423135
Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
2014-09-08 15:36:21 -07:00
Dmitriy Ivanov
14669a939d Load libraries in breadth-first order
This patch fixes the problem with symbol search order
  for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
  and ld_preloads in correct order.

Bug: https://code.google.com/p/android/issues/detail?id=74255
Change-Id: If1ba5c807322409faa914e27ecb675e2c4541f0d
Attempt: 2
2014-09-08 13:02:50 -07:00
Elliott Hughes
b614b05942 am 2af51cac: Merge "resolved conflicts for merge of c8f6b82f to lmp-dev-plus-aosp" into lmp-dev-plus-aosp
* commit '2af51cacde8e8e15639352f96e46cbc9e9e6a4f6':
  Don't expose non-standard basename_r and dirname_r in LP64.
2014-09-08 18:52:42 +00:00
Elliott Hughes
347e873bfb am 6b779c6b: am 51c8355d: Add arc4random_addrandom binary compatibility.
* commit '6b779c6b61ec662f19f9ea30fd003c770799196c':
  Add arc4random_addrandom binary compatibility.
2014-09-08 18:52:42 +00:00
Elliott Hughes
2af51cacde Merge "resolved conflicts for merge of c8f6b82f to lmp-dev-plus-aosp" into lmp-dev-plus-aosp 2014-09-08 18:41:54 +00:00
Elliott Hughes
08df25419f resolved conflicts for merge of c8f6b82f to lmp-dev-plus-aosp
Change-Id: I03a4645eb5fbb54e41da25018729b270ba0ed48e
2014-09-08 11:41:30 -07:00
Elliott Hughes
6b779c6b61 am 51c8355d: Add arc4random_addrandom binary compatibility.
* commit '51c8355d5cf4b83ccd2ad250ca4c61a616356c2b':
  Add arc4random_addrandom binary compatibility.
2014-09-08 18:36:55 +00:00
Elliott Hughes
b03d3102c3 am ffa8672b: am d3d89f0d: Merge "Add arc4random_addrandom binary compatibility."
* commit 'ffa8672bd5722b9bb2f13dcabffb2814b2edd0ea':
  Add arc4random_addrandom binary compatibility.
2014-09-08 18:26:26 +00:00
Elliott Hughes
ffa8672bd5 am d3d89f0d: Merge "Add arc4random_addrandom binary compatibility."
* commit 'd3d89f0d28aba2db9f11cc0a9b3a865fa1d9d265':
  Add arc4random_addrandom binary compatibility.
2014-09-08 18:11:52 +00:00
Elliott Hughes
c8f6b82f87 Merge "Don't expose non-standard basename_r and dirname_r in LP64." into lmp-dev 2014-09-08 18:07:08 +00:00
Elliott Hughes
d3d89f0d28 Merge "Add arc4random_addrandom binary compatibility." 2014-09-08 17:53:04 +00:00
Elliott Hughes
fc829736e1 Add arc4random_addrandom binary compatibility.
This was in <stdlib.h> in older releases. It's no longer used, but we can
preserve backwards compatibility by making it a no-op.

(cherry-pick of 51c8355d5cf4b83ccd2ad250ca4c61a616356c2b.)

Bug: 16205834
Change-Id: Idde7b46df4f253e39675600bcf82352879a716e7
2014-09-08 10:52:28 -07:00
Elliott Hughes
51c8355d5c Add arc4random_addrandom binary compatibility.
This was in <stdlib.h> in older releases. It's no longer used, but we can
preserve backwards compatibility by making it a no-op.

Bug: 16205834
Change-Id: Idde7b46df4f253e39675600bcf82352879a716e7
2014-09-08 10:47:45 -07:00
Christopher Ferris
d790900d5f am 9e7abe2e: am b4673c41: Merge "Add dlmalloc_usable_size for 32 bit arches."
* commit '9e7abe2e60c16ca3ffb3d1839c040fe2c3d34551':
  Add dlmalloc_usable_size for 32 bit arches.
2014-09-06 20:37:54 +00:00
Christopher Ferris
9e7abe2e60 am b4673c41: Merge "Add dlmalloc_usable_size for 32 bit arches."
* commit 'b4673c41025f3a16804aff8438c2810c739a11ef':
  Add dlmalloc_usable_size for 32 bit arches.
2014-09-06 20:28:37 +00:00
Christopher Ferris
7f6006d232 am eb1dd673: am 47ed03f7: Merge "Add dlmalloc_usable_size for 32 bit arches." into lmp-dev
* commit 'eb1dd673ecb660a56c19a04697a14ed56db5eb91':
  Add dlmalloc_usable_size for 32 bit arches.
2014-09-06 20:24:21 +00:00
Christopher Ferris
b4673c4102 Merge "Add dlmalloc_usable_size for 32 bit arches." 2014-09-06 20:17:02 +00:00
Christopher Ferris
eb1dd673ec am 47ed03f7: Merge "Add dlmalloc_usable_size for 32 bit arches." into lmp-dev
* commit '47ed03f70c6c9addc7f05e4ee4dc71c96d215105':
  Add dlmalloc_usable_size for 32 bit arches.
2014-09-06 20:14:17 +00:00
Christopher Ferris
f903558446 Add dlmalloc_usable_size for 32 bit arches.
Bug: 17337831

(cherry picked from commit 1c365cb494d8cab1b639ecef21514425647e606b)

Change-Id: Ice100e42eeac4b9c3b77737a546ec33174adcb2f
2014-09-06 13:06:57 -07:00
Christopher Ferris
47ed03f70c Merge "Add dlmalloc_usable_size for 32 bit arches." into lmp-dev 2014-09-06 19:58:40 +00:00
Christopher Ferris
1c365cb494 Add dlmalloc_usable_size for 32 bit arches.
Bug: 17337831
Change-Id: I50c50559a5dfa083c85f064042bc0726718c988b
2014-09-05 18:37:30 -07:00
Ying Wang
dc787b75d5 am 455577d3: am e07b4da5: Merge "Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker."
* commit '455577d3ce64135fcb6ce33cd6d3c73b06189e40':
  Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker.
2014-09-06 00:10:28 +00:00
Dmitriy Ivanov
2f06081a97 am 2a0105f9: am 320a01d5: Merge "Revert "Load libraries in breadth-first order""
* commit '2a0105f95d91653626996fa3e8416bfcb41d3048':
  Revert "Load libraries in breadth-first order"
2014-09-06 00:10:28 +00:00
Ying Wang
455577d3ce am e07b4da5: Merge "Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker."
* commit 'e07b4da53ddcb34939c1b5a88db36dec34352add':
  Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker.
2014-09-05 23:58:08 +00:00
Dmitriy Ivanov
2a0105f95d am 320a01d5: Merge "Revert "Load libraries in breadth-first order""
* commit '320a01d51693408dad859094ca52e5f315ff1d15':
  Revert "Load libraries in breadth-first order"
2014-09-05 23:58:07 +00:00
Ying Wang
e07b4da53d Merge "Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker." 2014-09-05 23:41:25 +00:00
Dmitriy Ivanov
fa0f9cc9f1 am 4a4dc7b3: am b3ebfecd: Merge "Fix order of soinfo links (repairs libcxx tests)."
* commit '4a4dc7b37c3a26a349d771755fb8bfb0ba4a05c9':
  Fix order of soinfo links (repairs libcxx tests).
2014-09-05 23:38:02 +00:00
Dmitriy Ivanov
320a01d516 Merge "Revert "Load libraries in breadth-first order"" 2014-09-05 23:36:22 +00:00
Dmitriy Ivanov
498eb18b82 Revert "Load libraries in breadth-first order"
This reverts commit a3ad450a2e3fb6b3fe359683b247eba20896f646.

Change-Id: Ia2b838ad2159c643b80c514849582f4b4f4f40e5
2014-09-05 16:27:54 -07:00
Dmitriy Ivanov
4a4dc7b37c am b3ebfecd: Merge "Fix order of soinfo links (repairs libcxx tests)."
* commit 'b3ebfecdae05e29062bf4d0234239a54a2733ce0':
  Fix order of soinfo links (repairs libcxx tests).
2014-09-05 23:27:30 +00:00
Ying Wang
f9e147b0bf Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker.
Previously we duplicated code in build/core/executable.mk and it's hard
to maintain. LOCAL_POST_LINK_CMD is a clean solution for this.

Bug: 17403674
Change-Id: I8c054bf782af68cf1f88b8d787a78ca74a7968b5
2014-09-05 16:16:35 -07:00
Elliott Hughes
f0e9458ea5 Don't expose non-standard basename_r and dirname_r in LP64.
Bug: 17407423
Change-Id: I47fe499a4c396bf09d7b78fd828728d04777398b
2014-09-05 16:12:42 -07:00
Dmitriy Ivanov
b3ebfecdae Merge "Fix order of soinfo links (repairs libcxx tests)." 2014-09-05 23:11:19 +00:00
Dmitriy Ivanov
b2a30ee8d2 Fix order of soinfo links (repairs libcxx tests).
Change-Id: Iee9de09657351cd6a7512784ca797e4b84cdd98b
2014-09-05 16:01:47 -07:00
Chih-Hung Hsieh
6d4d735ae5 am 1325d50c: am 8adace5f: Merge "Enable clang compilation with libc but not linker."
* commit '1325d50c721717032bce940554e21f0cc28c08e5':
  Enable clang compilation with libc but not linker.
2014-09-05 19:21:38 +00:00
Chih-Hung Hsieh
1325d50c72 am 8adace5f: Merge "Enable clang compilation with libc but not linker."
* commit '8adace5f2c185bd616f79159eaf90d2982157069':
  Enable clang compilation with libc but not linker.
2014-09-05 19:11:06 +00:00
Chih-Hung Hsieh
8adace5f2c Merge "Enable clang compilation with libc but not linker." 2014-09-05 18:54:48 +00:00
Chih-Hung Hsieh
b58db8b083 Enable clang compilation with libc but not linker.
Clang is still disabled for x86 and x86_64 long double code,
for x86_64 special assembly instruction, and the linker module.

BUG: 17163651
BUG: 17302991
BUG: 17403674
Change-Id: I43c5f5f0ddc0c2a31918f00b57150dadd8f3f26b
2014-09-05 11:18:35 -07:00
Elliott Hughes
911b47f684 am 3fd8eee5: am 5beddb7d: Fix pthread_attr_getstack__main_thread.
* commit '3fd8eee516e9376351c0c06af47154765f1ca647':
  Fix pthread_attr_getstack__main_thread.
2014-09-05 15:43:29 +00:00
Elliott Hughes
3fd8eee516 am 5beddb7d: Fix pthread_attr_getstack__main_thread.
* commit '5beddb7d642524ecb6655ab2823caf2add679917':
  Fix pthread_attr_getstack__main_thread.
2014-09-05 15:32:44 +00:00
Elliott Hughes
5beddb7d64 Fix pthread_attr_getstack__main_thread.
There were two problems here:

* This would fail when run with unlimited stack, because it didn't know
  that bionic reports unlimited stacks as 8MiB.

* This would leave RLIMIT_STACK small, causing failures to exec (so the
  popen and system tests would fail).

(cherry-pick of 27a9aed81978af792cb06035a1619c8141a5fb5b plus the
new ScopeGuard.h from a3ad450a2e3fb6b3fe359683b247eba20896f646.)

Bug: 17394276
Change-Id: I5b92dc64ca089400223b2d9a3743e9b9d57c1bc2
2014-09-04 20:34:03 -07:00
Dmitriy Ivanov
feb717abdd am b7f09d06: am 001815ed: Merge "Reset enviroment for math_tests"
* commit 'b7f09d065473adf6b504ccb08f0b0d25c09e70b4':
  Reset enviroment for math_tests
2014-09-05 02:33:04 +00:00
Dmitriy Ivanov
b7f09d0654 am 001815ed: Merge "Reset enviroment for math_tests"
* commit '001815ed197280409d08e9622890e7462c6e6831':
  Reset enviroment for math_tests
2014-09-05 02:21:28 +00:00
Dmitriy Ivanov
001815ed19 Merge "Reset enviroment for math_tests" 2014-09-05 01:56:44 +00:00
Dmitriy Ivanov
7b956ede3f Reset enviroment for math_tests
Bug: 17390824
Change-Id: I42f4c8d9199a2efe7641f0b0e64580cacb5695da
2014-09-04 18:38:21 -07:00
Elliott Hughes
32f8fef668 am 5c5bb4d0: am aca9cae3: Merge "Fix pthread_attr_getstack__main_thread."
* commit '5c5bb4d04ea5221088b0b3cdb63225237c1ff11a':
  Fix pthread_attr_getstack__main_thread.
2014-09-04 23:46:35 +00:00
Elliott Hughes
d3e1b1c59c am fc8f246a: am c74a7680: Merge "Fix mips signed/unsigned signal_test.cpp build breakage."
* commit 'fc8f246a49240b6fc7ed0d83a971219989fd290a':
  Fix mips signed/unsigned signal_test.cpp build breakage.
2014-09-04 23:36:33 +00:00
Dmitriy Ivanov
ff5a8672e1 am 4effe38a: am 44352f5f: Merge "Revert "Register __libc_fini as early as possible.""
* commit '4effe38ae68170539869753aa77855807ed4b970':
  Revert "Register __libc_fini as early as possible."
2014-09-04 23:36:32 +00:00
Dmitriy Ivanov
ec6099ec64 am 24d40f2d: am c0cd9ce5: Merge "Revert "Fix arm64 build""
* commit '24d40f2df06fc5fafd938bd828ba7c9e264c2a0d':
  Revert "Fix arm64 build"
2014-09-04 23:36:32 +00:00
Elliott Hughes
5c5bb4d04e am aca9cae3: Merge "Fix pthread_attr_getstack__main_thread."
* commit 'aca9cae30972ba2cd7a1158520dccd83b056513c':
  Fix pthread_attr_getstack__main_thread.
2014-09-04 23:33:50 +00:00