OSDN Git Service
Dmitriy Ivanov [Fri, 12 Sep 2014 16:43:13 +0000 (09:43 -0700)]
Reformatting
No functional changes.
Change-Id: If71775e5fc207e91ebd31ba3c5f9d2c13dc8dada
Elliott Hughes [Fri, 12 Sep 2014 01:27:44 +0000 (01:27 +0000)]
Merge "Expose __swsetup for LP32 binary compatibility."
Elliott Hughes [Thu, 11 Sep 2014 23:41:11 +0000 (16:41 -0700)]
Expose __swsetup for LP32 binary compatibility.
(cherry-pick of
7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6.)
Bug:
17476127
Change-Id: I0ef1355ac913d782c268a638f88642d6cfc236c2
Dmitriy Ivanov [Fri, 12 Sep 2014 00:40:11 +0000 (00:40 +0000)]
Merge "Add IFUNC support for arm64 and IRELATIVE reloc"
Dmitriy Ivanov [Thu, 11 Sep 2014 22:16:03 +0000 (15:16 -0700)]
Add IFUNC support for arm64 and IRELATIVE reloc
There are number of changes in the way IFUNC related relocations are done:
1. IRELATIVE relocations are now supported for x86/x86_64 and arm64.
2. IFUNC relocations are now relying on static linker to generate
them in correct order - this removes necessety of additional
relocation pass for ifuncs.
3. Related to 2: rela?.dyn relocations are preformed before .plt ones.
4. Ifunc are resolved on symbol lookup this approach allowed to avoid
mprotect(PROT_WRITE) call on r-x program segments.
Bug:
17399706
Bug:
17177284
Change-Id: I414dd3e82bd47cc03442c5dfc7c279949aec51ed
Elliott Hughes [Thu, 11 Sep 2014 23:25:46 +0000 (23:25 +0000)]
Merge "Add pthread_gettid_np and re-expose __get_thread for LP32."
Elliott Hughes [Thu, 11 Sep 2014 23:11:43 +0000 (16:11 -0700)]
Add pthread_gettid_np and re-expose __get_thread for LP32.
A lot of third-party code calls the private __get_thread symbol,
often as part of a backport of bionic's pthread_rwlock implementation.
Hopefully this will go away for LP64 (since you're guaranteed the
real implementation there), but there are still APIs that take a tid
and no way to convert between a pthread_t and a tid. pthread_gettid_np
is a public API for that. To aid the transition, make __get_thread
available again for LP32.
(cherry-pick of
27efc48814b8153c55cbcd0af5d9add824816e69.)
Bug:
14079438
Change-Id: I43fabc7f1918250d31d4665ffa4ca352d0dbeac1
Elliott Hughes [Thu, 11 Sep 2014 17:12:48 +0000 (17:12 +0000)]
Merge "Fix mips __fadvise64.S build failure."
Elliott Hughes [Thu, 11 Sep 2014 17:10:08 +0000 (10:10 -0700)]
Fix mips __fadvise64.S build failure.
Bug:
12449798
Change-Id: I0663b741108ba2f1d286904d6414b3ff4d475551
Elliott Hughes [Thu, 11 Sep 2014 15:46:44 +0000 (15:46 +0000)]
Merge "Add posix_fadvise(3)."
Elliott Hughes [Thu, 11 Sep 2014 00:39:00 +0000 (17:39 -0700)]
Add posix_fadvise(3).
(cherry-pick of
00008263782e484020420c606f7d145fe7d0a4d8.)
Bug:
12449798
Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
Lorenzo Colitti [Tue, 9 Sep 2014 10:22:17 +0000 (10:22 +0000)]
Merge "When comparing DNS server configs, also compare number of servers"
Lorenzo Colitti [Mon, 8 Sep 2014 09:09:43 +0000 (18:09 +0900)]
When comparing DNS server configs, also compare number of servers
Bug:
16070602
Change-Id: I605f1cca50b08479ebcad290b3bd179f59be8a96
Dmitriy Ivanov [Tue, 9 Sep 2014 00:49:37 +0000 (00:49 +0000)]
Merge "Load libraries in breadth-first order"
Elliott Hughes [Mon, 8 Sep 2014 23:47:53 +0000 (23:47 +0000)]
Merge "Ensure __set_errno is still visible on LP32."
Elliott Hughes [Mon, 8 Sep 2014 22:25:01 +0000 (15:25 -0700)]
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.
(cherry-pick of
7efad83d430f4d824f2aaa75edea5106f6ff8aae.)
Bug:
17423135
Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
Elliott Hughes [Mon, 8 Sep 2014 23:46:04 +0000 (23:46 +0000)]
Merge "Don't expose non-standard basename_r and dirname_r in LP64."
Elliott Hughes [Fri, 5 Sep 2014 23:12:42 +0000 (16:12 -0700)]
Don't expose non-standard basename_r and dirname_r in LP64.
(cherry-pick of
f0e9458ea596227720fa745df15f5357f6c0c8f6.)
Bug:
17407423
Change-Id: I47fe499a4c396bf09d7b78fd828728d04777398b
Dmitriy Ivanov [Fri, 5 Sep 2014 23:42:53 +0000 (16:42 -0700)]
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
Elliott Hughes [Mon, 8 Sep 2014 17:53:03 +0000 (17:53 +0000)]
Merge "Add arc4random_addrandom binary compatibility."
Elliott Hughes [Mon, 8 Sep 2014 17:25:33 +0000 (10:25 -0700)]
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
Christopher Ferris [Sat, 6 Sep 2014 20:17:02 +0000 (20:17 +0000)]
Merge "Add dlmalloc_usable_size for 32 bit arches."
Christopher Ferris [Fri, 5 Sep 2014 23:39:22 +0000 (16:39 -0700)]
Add dlmalloc_usable_size for 32 bit arches.
Bug:
17337831
(cherry picked from commit
1c365cb494d8cab1b639ecef21514425647e606b)
Change-Id: Ice100e42eeac4b9c3b77737a546ec33174adcb2f
Ying Wang [Fri, 5 Sep 2014 23:41:25 +0000 (23:41 +0000)]
Merge "Use LOCAL_POST_LINK_CMD to insert the objcopy command for linker."
Dmitriy Ivanov [Fri, 5 Sep 2014 23:36:22 +0000 (23:36 +0000)]
Merge "Revert "Load libraries in breadth-first order""
Dmitriy Ivanov [Fri, 5 Sep 2014 21:57:59 +0000 (14:57 -0700)]
Revert "Load libraries in breadth-first order"
This reverts commit
a3ad450a2e3fb6b3fe359683b247eba20896f646.
Change-Id: Ia2b838ad2159c643b80c514849582f4b4f4f40e5
Ying Wang [Fri, 5 Sep 2014 22:42:12 +0000 (15:42 -0700)]
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
Dmitriy Ivanov [Fri, 5 Sep 2014 23:11:18 +0000 (23:11 +0000)]
Merge "Fix order of soinfo links (repairs libcxx tests)."
Dmitriy Ivanov [Fri, 5 Sep 2014 01:23:00 +0000 (18:23 -0700)]
Fix order of soinfo links (repairs libcxx tests).
Change-Id: Iee9de09657351cd6a7512784ca797e4b84cdd98b
Chih-Hung Hsieh [Fri, 5 Sep 2014 18:54:48 +0000 (18:54 +0000)]
Merge "Enable clang compilation with libc but not linker."
Chih-Hung Hsieh [Thu, 4 Sep 2014 22:19:52 +0000 (15:19 -0700)]
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
Dmitriy Ivanov [Fri, 5 Sep 2014 01:56:44 +0000 (01:56 +0000)]
Merge "Reset enviroment for math_tests"
Dmitriy Ivanov [Thu, 4 Sep 2014 19:47:07 +0000 (12:47 -0700)]
Reset enviroment for math_tests
Bug:
17390824
Change-Id: I42f4c8d9199a2efe7641f0b0e64580cacb5695da
Elliott Hughes [Thu, 4 Sep 2014 23:20:53 +0000 (23:20 +0000)]
Merge "Fix pthread_attr_getstack__main_thread."
Elliott Hughes [Thu, 4 Sep 2014 23:09:25 +0000 (16:09 -0700)]
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).
Change-Id: I5b92dc64ca089400223b2d9a3743e9b9d57c1bc2
Elliott Hughes [Thu, 4 Sep 2014 22:48:15 +0000 (22:48 +0000)]
Merge "Fix mips signed/unsigned signal_test.cpp build breakage."
Elliott Hughes [Thu, 4 Sep 2014 22:43:10 +0000 (15:43 -0700)]
Fix mips signed/unsigned signal_test.cpp build breakage.
Change-Id: I045ce017c0c51e1843193759a2eb6fc5b93e3867
Dmitriy Ivanov [Thu, 4 Sep 2014 21:55:59 +0000 (21:55 +0000)]
Merge "Revert "Register __libc_fini as early as possible.""
Dmitriy Ivanov [Thu, 4 Sep 2014 21:55:55 +0000 (21:55 +0000)]
Merge "Revert "Fix arm64 build""
Dmitriy Ivanov [Thu, 4 Sep 2014 21:54:34 +0000 (21:54 +0000)]
Revert "Register __libc_fini as early as possible."
This reverts commit
e880c736d6c1d947f6309d5f1f63c74e8345c6a6.
Change-Id: Ide83e442eb5dbfef5298a15bc602c3fe1dda1862
Dmitriy Ivanov [Thu, 4 Sep 2014 21:53:14 +0000 (21:53 +0000)]
Revert "Fix arm64 build"
This reverts commit
5c1a7fdbd5a085024019b4c9307d2b2ace35df5e.
Change-Id: Ia5fea0d6a8f59700edce0742e2271b5f02a5d87c
Elliott Hughes [Thu, 4 Sep 2014 21:03:33 +0000 (21:03 +0000)]
Merge "Don't mask out SA_RESTORER from sa_flags."
Elliott Hughes [Thu, 4 Sep 2014 20:54:42 +0000 (13:54 -0700)]
Don't mask out SA_RESTORER from sa_flags.
glibc doesn't do this, and we probably shouldn't either.
Bug:
16703540
Change-Id: Id5b93c3782e34024a9916463348e8f3caff191bf
Chih-Hung Hsieh [Thu, 4 Sep 2014 20:44:34 +0000 (20:44 +0000)]
Merge "Disable Clang, due to x86 LDBL_MANT_DIG errors."
Chih-Hung Hsieh [Thu, 4 Sep 2014 19:35:19 +0000 (12:35 -0700)]
Disable Clang, due to x86 LDBL_MANT_DIG errors.
Clang -m32 has incorrect sizeof(long double) = 12.
With -m64, LDBL_MANT_DIG is incorrect 64.
BUG:
17163651
Change-Id: I4b157aa1a8572c3a10aece6070e119a292ab8e83
Elliott Hughes [Thu, 4 Sep 2014 17:02:10 +0000 (17:02 +0000)]
Merge "_GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE."
Elliott Hughes [Thu, 4 Sep 2014 15:52:38 +0000 (08:52 -0700)]
_GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE.
This showed up as open_memstream not being visible in <stdio.h>
if only _GNU_SOURCE was defined.
Bug:
17361504
Change-Id: I38f9843f4e6ee770a6325ad50f779bda5495ffca
Dmitriy Ivanov [Thu, 4 Sep 2014 00:59:22 +0000 (00:59 +0000)]
Merge "Load libraries in breadth-first order"
Dmitriy Ivanov [Wed, 3 Sep 2014 23:36:34 +0000 (23:36 +0000)]
Merge "Fix arm64 build"
Elliott Hughes [Wed, 3 Sep 2014 23:34:04 +0000 (23:34 +0000)]
Merge "Add back a dummy arc4random_stir for compatibility."
Dmitriy Ivanov [Wed, 3 Sep 2014 23:33:08 +0000 (16:33 -0700)]
Fix arm64 build
Bug:
14611536
Change-Id: I4f7f4d1f5c0a37ef38fa0956778393f8d7668512
Elliott Hughes [Wed, 3 Sep 2014 22:53:11 +0000 (15:53 -0700)]
Add back a dummy arc4random_stir for compatibility.
The current arc4random implementation stirs itself as needed, but we
need to keep an arc4random_stir symbol around for binary compatibility.
(cherry-pick of
1e010d60397db706cd3d1c4d5701a2bced441aa8.)
Bug:
17291075
Change-Id: Iaf6171c3ec65c39c1868364d5b35ea280e29a363
Dmitriy Ivanov [Wed, 3 Sep 2014 22:29:59 +0000 (22:29 +0000)]
Merge "Register __libc_fini as early as possible."
Dmitriy Ivanov [Wed, 3 Sep 2014 21:56:05 +0000 (14:56 -0700)]
Register __libc_fini as early as possible.
We want __libc_fini to be called after all the destructors.
Bug:
14611536
Change-Id: Ibb83a94436795ec178fd605fa531ac29608f4a3e
Dmitriy Ivanov [Wed, 3 Sep 2014 22:08:56 +0000 (22:08 +0000)]
Merge "Make string tests check all alignment combinations"
Dmitriy Ivanov [Tue, 29 Jul 2014 21:21:45 +0000 (14:21 -0700)]
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: I4cf84c70dbaabe99310230dfda12385ae5401859
Dan Albert [Wed, 3 Sep 2014 18:37:11 +0000 (18:37 +0000)]
Merge "Don't fail a test just because we aren't root."
Dan Albert [Wed, 3 Sep 2014 18:30:21 +0000 (11:30 -0700)]
Don't fail a test just because we aren't root.
If the tests are not being run as root, emit a message and don't
continue with the test.
Change-Id: I352e1a4162caaeb18b81b8daf44797009756dcd9
Dmitriy Ivanov [Wed, 3 Sep 2014 00:36:22 +0000 (00:36 +0000)]
Merge "Add some missing dlclose(.)"
Dmitriy Ivanov [Wed, 3 Sep 2014 00:31:44 +0000 (17:31 -0700)]
Add some missing dlclose(.)
Bug:
17358010
Change-Id: I9e427b7681f1a8fe890b0b47812d9e65ab95c792
Dan Albert [Tue, 2 Sep 2014 23:11:42 +0000 (23:11 +0000)]
Merge "Start math tests with a clean fenv."
Dan Albert [Tue, 2 Sep 2014 23:00:10 +0000 (16:00 -0700)]
Start math tests with a clean fenv.
We always want the default floating point environment when running these
tests.
Bug:
17358010
Change-Id: I6ca2552e9f2d3e07d7b9dcaf0aec66905401c466
Dan Albert [Tue, 2 Sep 2014 22:43:17 +0000 (22:43 +0000)]
Merge "Prevent a few test pthread keys from leaking."
Dan Albert [Tue, 2 Sep 2014 22:24:26 +0000 (15:24 -0700)]
Prevent a few test pthread keys from leaking.
Bug:
17358010
Change-Id: Ie718dc215ddfd431650295a1630c1b1716760c3d
Elliott Hughes [Tue, 2 Sep 2014 20:53:30 +0000 (20:53 +0000)]
Merge "MIPS64 syscall() arguments"
Chris Dearman [Wed, 20 Aug 2014 23:39:47 +0000 (16:39 -0700)]
MIPS64 syscall() arguments
The seventh argument for syscall is passed in a register, not on the stack
Change-Id: Idb69fac77d1f710cff5a3ab4ae1259feb61ae69d
Dmitriy Ivanov [Tue, 2 Sep 2014 19:25:08 +0000 (19:25 +0000)]
Merge "Encapsulate soinfo_link_image and soinfo_relocate"
Dmitriy Ivanov [Tue, 2 Sep 2014 18:47:23 +0000 (11:47 -0700)]
Encapsulate soinfo_link_image and soinfo_relocate
Also get rid of needed[] array for these functions
Change-Id: I8d12887dbec0724309bb171e6bbd9b9ceb32cc70
Elliott Hughes [Tue, 2 Sep 2014 17:57:10 +0000 (17:57 +0000)]
Merge "Upgrade bionic to tzdata2014g."
Dmitriy Ivanov [Tue, 2 Sep 2014 17:21:51 +0000 (17:21 +0000)]
Merge "Introduce size-based r/w allocators"
Dmitriy Ivanov [Tue, 2 Sep 2014 16:54:14 +0000 (16:54 +0000)]
Merge "Implement LinkedList::visit()"
Elliott Hughes [Tue, 2 Sep 2014 16:44:33 +0000 (09:44 -0700)]
Upgrade bionic to tzdata2014g.
From the release notes:
Changes affecting future time stamps
Turks & Caicos is switching from US eastern time to UTC-4 year-round,
modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00.
Changes affecting past time stamps
Time in Russia or the USSR before 1926 or so has been corrected by
a few seconds in the following zones: Asia/Irkutsk,
Asia/Krasnoyarsk, Asia/Omsk, Asia/Samarkand, Asia/Tbilisi,
Asia/Vladivostok, Asia/Yakutsk, Europe/Riga, Europe/Samara. For
Asia/Yekaterinburg the correction is a few minutes. (Thanks to
Vladimir Karpinsky.)
The Portuguese decree of 1911-05-26 took effect on 1912-01-01.
This affects 1911 time stamps in Africa/Bissau, Africa/Luanda,
Atlantic/Azores, and Atlantic/Madeira. Also, Lisbon's pre-1912
GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32.
(Thanks to Stephen Colebourne for pointing to the decree.)
Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59.
A new file 'backzone' contains data which may appeal to
connoisseurs of old time stamps, although it is out of scope for
the tz database, is often poorly sourced, and contains some data
that is known to be incorrect. The new file is not recommended
for ordinary use and its entries are not installed by default.
(Thanks to Lester Caine for the high-quality Jersey, Guernsey, and
Isle of Man entries.)
Some more zones have been turned into links, when they differed
from existing zones only for older time stamps. As usual,
these changes affect UTC offsets in pre-1970 time stamps only.
Their old contents have been moved to the 'backzone' file.
The affected zones are: Africa/Bangui, Africa/Brazzaville,
Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda,
Africa/Malabo, Africa/Niamey, and Africa/Porto-Novo.
Bug:
17277574
Change-Id: Idff4a68e927d49bef1e787af534e1b23b5b8a7fb
Dmitriy Ivanov [Tue, 2 Sep 2014 16:45:40 +0000 (09:45 -0700)]
Implement LinkedList::visit()
Change-Id: Ibd9d133dddf1f2e6e65660e3cd2dacafcc0c84d9
Dmitriy Ivanov [Mon, 1 Sep 2014 23:15:52 +0000 (16:15 -0700)]
Introduce size-based r/w allocators
Change-Id: I75165fc392e5380124039e6db49b0f559c8a518e
Dmitriy Ivanov [Mon, 1 Sep 2014 21:16:40 +0000 (21:16 +0000)]
Merge "Look into ld_preloads before current library"
Dmitriy Ivanov [Fri, 29 Aug 2014 17:15:25 +0000 (10:15 -0700)]
Look into ld_preloads before current library
Change lookup order during relocation so that
ld_preloads always precede caller (unless caller
is main executable).
Asan needs this change in order to intercept libc->libc
calls.
Bug:
15432753
(cherry picked from commit
05e190c093ad5b04691ed87100a711ef91f380b0)
Change-Id: I5bfb58e18015b1ec5b77842dbb37fb122fa1fd1a
Dmitriy Ivanov [Mon, 1 Sep 2014 21:06:32 +0000 (21:06 +0000)]
Merge "Erase elements in LinkedList::remove_if"
Hans Boehm [Sat, 30 Aug 2014 00:49:51 +0000 (00:49 +0000)]
Merge "Make stdatomic.h work with gcc4.6 host compiler"
Dmitriy Ivanov [Fri, 29 Aug 2014 21:01:48 +0000 (14:01 -0700)]
Erase elements in LinkedList::remove_if
Change-Id: I5119a78c73ffe780a81c53ab5ff0266d5c82d319
Hans Boehm [Thu, 28 Aug 2014 22:21:32 +0000 (15:21 -0700)]
Make stdatomic.h work with gcc4.6 host compiler
This is needed to make L work correctly, and bionic tests pass
again, after applying the equivalent of
commit
00aaea364501b3b0abe58dae461136159df1e356 there.
It makes the preexisting code that uses __sync implementations
much more useful, although we should no longer be exercising that
code in AOSP.
Specifically fixes:
We were invoking __has_extension and __has_builtin for GCC compilations.
They're clang specific. Restructured the tests.
The __sync implementation was not defining the LOCK_FREE macros.
ATOMIC_VAR_INIT was using named field initializations. These are a
C, not C++, feature, that is not supported by g++ 4.6.
The stdatomic bionic test still failed with 4.6 and glibc with our
questionable LOCK_FREE macro implementation. Don't run that piece
with 4.6.
In L, this is a prerequisite for fixing:
Bug:
16880454
Bug:
16513433
Change-Id: I9b61e42307f96a114dce7552b6ead4ad1c544eab
Elliott Hughes [Fri, 29 Aug 2014 23:08:00 +0000 (23:08 +0000)]
Merge "Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc."
Elliott Hughes [Fri, 29 Aug 2014 22:54:11 +0000 (15:54 -0700)]
Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Bug:
16874785
Change-Id: I8512f8be3fd149d8720c5c3b4657bedd5ce2b1d1
Dmitriy Ivanov [Fri, 29 Aug 2014 22:30:07 +0000 (22:30 +0000)]
Merge "Replace NULL with nullptr"
Dmitriy Ivanov [Fri, 29 Aug 2014 19:02:36 +0000 (12:02 -0700)]
Replace NULL with nullptr
Change-Id: Iad50be617d318ca98883b843229c960ad5b9afa9
Elliott Hughes [Fri, 29 Aug 2014 18:12:36 +0000 (18:12 +0000)]
Merge "The host prebuilt glibc is 2.11, so remove workarounds for 2.9."
Chih-Hung Hsieh [Fri, 29 Aug 2014 03:10:43 +0000 (03:10 +0000)]
Merge "Ignore all __weak_alias in OpenBSD libC."
Elliott Hughes [Fri, 29 Aug 2014 02:28:35 +0000 (19:28 -0700)]
The host prebuilt glibc is 2.11, so remove workarounds for 2.9.
Change-Id: I1072fcebc8b3018580a9d069fe6eca9c4e74e865
Elliott Hughes [Fri, 29 Aug 2014 02:26:33 +0000 (02:26 +0000)]
Merge "Add GNU-compatible strerror_r."
Elliott Hughes [Tue, 19 Aug 2014 00:28:32 +0000 (17:28 -0700)]
Add GNU-compatible strerror_r.
We already had the POSIX strerror_r, but some third-party code defines
_GNU_SOURCE and expects to get the GNU strerror_r instead.
This exposed a bug in the libc internal logging functions where unlike
their standard brethren they wouldn't return the number of bytes they'd
have liked to have written.
Bug:
16243479
Change-Id: I1745752ccbdc569646d34f5071f6df2be066d5f4
Chih-Hung Hsieh [Thu, 28 Aug 2014 18:47:48 +0000 (11:47 -0700)]
Ignore all __weak_alias in OpenBSD libC.
GCC assembler allows xyz to be redeclared as weak,
by __weak_alias(xyz, _xyz), while _xyz is undefined.
Clang does not like that but silently generates no code.
It will reject its own .s file if the assembly code is saved first.
Since we have no reason to define xyz or _xyz as weak symbol now,
and _xyz is a macro to xyz, we simplify libC to have only
xyz defined as global.
BUG:
17186746
Change-Id: I24b154425838683cae69248cc750c59e26fd5467
Elliott Hughes [Wed, 27 Aug 2014 23:43:26 +0000 (23:43 +0000)]
Merge "Have pthread_attr_getstack for the main thread report RLIMIT_STACK..."
Christopher Ferris [Wed, 27 Aug 2014 23:29:18 +0000 (23:29 +0000)]
Merge "Replace snprintf calls in linker."
Chih-Hung Hsieh [Wed, 27 Aug 2014 23:07:54 +0000 (23:07 +0000)]
Merge "Fix strlen function type for mips."
Christopher Ferris [Wed, 27 Aug 2014 03:48:11 +0000 (20:48 -0700)]
Replace snprintf calls in linker.
When enabling debug malloc, the snprintf calls in the linker fails to
update the buffer.
The problem is that snprintf makes a call to pthread_getspecific that
returns a valid pointer, but the data it points to is zero. This should
never happen and causes the snprintf to stop and do nothing.
Temporarily replace snprintf with a different implementation to work
around this issue.
Bug:
16874447
Bug:
17302493
(cherry pick from commit
172955a4e30b88ce8239a7ef426b4e8903e9923c)
Change-Id: Idca9d417978403d61debfd0434aaa82fd770f33b
Chih-Hung Hsieh [Wed, 27 Aug 2014 21:13:09 +0000 (14:13 -0700)]
Fix strlen function type for mips.
Clang complains about incompatible-library-redeclaration.
BUG:
17302369
Change-Id: I3ae36f24846408c6464b84b5bddb1747e1e4a971
Chih-Hung Hsieh [Wed, 27 Aug 2014 22:46:06 +0000 (22:46 +0000)]
Merge "Replace ambiguous cmp instruction with cmpl."
Elliott Hughes [Wed, 27 Aug 2014 22:32:01 +0000 (15:32 -0700)]
Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
...rather than just what's already mapped in. This seems somewhat
contrary to POSIX's "All pages within the stack described by stackaddr
and stacksize shall be both readable and writable by the thread", but
it's what glibc does.
Bug:
17111575
Change-Id: If9e2dfad9a603c0d0615a8123aacda4946e95b2c
Chih-Hung Hsieh [Wed, 27 Aug 2014 22:04:23 +0000 (15:04 -0700)]
Replace ambiguous cmp instruction with cmpl.
Clang assembler rejects ambiguous cmp instruction.
BUG:
17302482
Change-Id: I74f49de87464541f9fe6fa288e4093a9fbf37120
Chih-Hung Hsieh [Wed, 27 Aug 2014 21:44:12 +0000 (21:44 +0000)]
Merge "Add missing type casts before comparison."
Christopher Ferris [Wed, 27 Aug 2014 21:21:28 +0000 (21:21 +0000)]
Merge "Use the default unwind code."