Commit Graph

5558 Commits

Author SHA1 Message Date
Dmitriy Ivanov
d5df4124bb Merge "Add RTLD_NODELETE flag support" 2014-10-02 21:47:29 +00:00
Hans Boehm
f26a55e13a am 2d111d9e: Merge "Make memory_order_acquire visible in global namespace"
* commit '2d111d9eb10b6c48e2e47251be66b418a6109dd9':
  Make memory_order_acquire visible in global namespace
2014-10-01 19:23:05 +00:00
Hans Boehm
2d111d9eb1 Merge "Make memory_order_acquire visible in global namespace" 2014-10-01 19:16:50 +00:00
Christopher Ferris
3a25cdfd33 am b19bd93f: Merge "Add stpcpy assembler version."
* commit 'b19bd93f8b83307f2f7530545f7c78824914f4eb':
  Add stpcpy assembler version.
2014-10-01 18:24:16 +00:00
Christopher Ferris
b19bd93f8b Merge "Add stpcpy assembler version." 2014-10-01 18:16:14 +00:00
Dmitriy Ivanov
1b20dafdbe Add RTLD_NODELETE flag support
Bug: https://code.google.com/p/android/issues/detail?id=64069
Change-Id: Ie5f90482feae86391172be4b32d6cb7d76f446fb
2014-10-01 11:09:37 -07:00
Elliott Hughes
1f84254edb am cadccfd7: Merge "Update bionic to tzdata 2014h."
* commit 'cadccfd70821aeb107b8fc0084da04faecbfde2f':
  Update bionic to tzdata 2014h.
2014-10-01 17:35:56 +00:00
Elliott Hughes
44ba5935e9 am 89fd3236: Merge "Fix update-tzdata.py to rebuild icu4c .dat file."
* commit '89fd32362bb62775aad001802bc79e3f07d7d62f':
  Fix update-tzdata.py to rebuild icu4c .dat file.
2014-10-01 17:35:55 +00:00
Elliott Hughes
cadccfd708 Merge "Update bionic to tzdata 2014h." 2014-10-01 17:20:34 +00:00
Christopher Ferris
7d849ac378 Add stpcpy assembler version.
For generic, continue to use the C version of the code.

Bug: 13746695
Change-Id: I77426a70b06131f2373bb51265bea1240bb3f101
2014-09-30 19:23:26 -07:00
Hans Boehm
76ac4d0853 Make memory_order_acquire visible in global namespace
We were missing that using directive when including <atomic>.

Bug:17736764
Change-Id: Ie8ca92a952749415567bcd5fa21d56629a364660
2014-09-30 18:35:04 -07:00
Elliott Hughes
0c8fb51e6b Update bionic to tzdata 2014h.
From the release notes:

  Changes affecting past time stamps

    America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28.

    Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on 1924-05-01,
    not 1920-01-06.  The old entry was based on a misinterpretation of Shanks.

    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/Blantyre, Africa/Bujumbura,
    Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi,
    Africa/Lusaka, Africa/Maseru, and Africa/Mbabane.

Bug: 17731498
Change-Id: If65b740d4e3a67075cca770655a1df17952c3da0
2014-09-30 17:35:38 -07:00
Elliott Hughes
f8896c6c93 Fix update-tzdata.py to rebuild icu4c .dat file.
Bug: 17731498
Change-Id: I4c810507c0ca9883dde1bece14530db80485b8f6
2014-09-30 17:30:01 -07:00
Elliott Hughes
d0fb0873f5 am 252c1ac9: Merge "Update our FreeBSD realpath(3) to upstream head."
* commit '252c1ac9738ff6187354f243ef118eac962b65dc':
  Update our FreeBSD realpath(3) to upstream head.
2014-10-01 00:05:58 +00:00
Dmitriy Ivanov
c1429de2eb am 1f7d5ac5: Merge "Fix unused DT entry warnings."
* commit '1f7d5ac53854a09bbcace08b3a1d1b9cf3f2eed3':
  Fix unused DT entry warnings.
2014-09-30 23:52:10 +00:00
Elliott Hughes
31e072fc9b Update our FreeBSD realpath(3) to upstream head.
Change-Id: I8c89728184ecd2c1a28a05cefa84a5037d28b552
2014-09-30 16:40:41 -07:00
Dmitriy Ivanov
6cdeb5234d Fix unused DT entry warnings.
DT_STRSZ Implement strtab boundary checks
 DT_FLAGS_1 Warn if flags other than DF_1_NOW|DF_1_GLOBAL are set

Bug: 17552334
Change-Id: Iaad29cd52f5b2d7d2f785fb351697906dc1617d9
2014-09-30 14:41:29 -07:00
Andrew Hsieh
98630f6cb7 am b104be32: Merge "Remove arch-mips64/bionic/__get_sp.S"
* commit 'b104be321f2538a6e0bbd566bc958537d1f65cef':
  Remove arch-mips64/bionic/__get_sp.S
2014-09-30 04:17:06 +00:00
Christopher Ferris
7de591d19b am 85a932c0: Merge "Cleanup arm assembly."
* commit '85a932c0c9225e0f71d94a0d8cbac85089a398cf':
  Cleanup arm assembly.
2014-09-30 04:17:05 +00:00
Andrew Hsieh
b0c0037370 Remove arch-mips64/bionic/__get_sp.S
__get_sp.S doesn't exist

Change-Id: Id84f8904c8022c683263a317a18fabeb50fed992
2014-09-30 07:55:32 +08:00
Christopher Ferris
c8bd2abab2 Cleanup arm assembly.
Remove the old arm directives.
Change the non-local labels to .L labels.
Add cfi directives to strcpy.S.

Change-Id: I9bafee1ffe5d85c92d07cfa8a85338cef9759562
2014-09-29 15:53:10 -07:00
Dan Albert
6251d58e66 am 73e6c9b3: Merge "Static libc++ is being renamed libc++_static."
* commit '73e6c9b39353807aae80170355ec0b67b7a4ce16':
  Static libc++ is being renamed libc++_static.
2014-09-29 20:55:46 +00:00
Dan Albert
188d093993 Static libc++ is being renamed libc++_static.
Change-Id: I1596110e4ed7e8f9ab9e2605dfcd9fd0489ca0d1
2014-09-27 09:22:07 -07:00
Dan Albert
5eb62b3919 am 7ca5c4b9: Merge "Make __aeabi_*() symbols weak."
* commit '7ca5c4b99b308550e34e185ed632b8a5ad5341ee':
  Make __aeabi_*() symbols weak.
2014-09-27 00:29:49 +00:00
Dan Albert
690211fcf8 Make __aeabi_*() symbols weak.
This is needed to avoid multiple symbol definitions when linking with
libstdc++ or with compiler-rt.

Change-Id: I2f713bcff113222f0d2538e49691e715d8a8475d
2014-09-26 15:36:14 -07:00
Christopher Ferris
1d8b9213a9 am aa66e882: Merge "Add __memcpy_chk assembly for 64 bit."
* commit 'aa66e8828048d8d6fd7e4bb9c5e341ed89614266':
  Add __memcpy_chk assembly for 64 bit.
2014-09-26 21:04:41 +00:00
Christopher Ferris
8cf61dab5f Add __memcpy_chk assembly for 64 bit.
Bug: 17623887
Change-Id: I443723bc941b40f84884b330d222baabee01f868
2014-09-26 12:47:04 -07:00
Elliott Hughes
e74a9d0b35 am aaad5485: Merge "Re-expose more stdio implementation details for LP32." into lmp-dev
* commit 'aaad548535c34e2bba16b2a0b71173e0ae4b16c0':
  Re-expose more stdio implementation details for LP32.
2014-09-25 03:13:56 +00:00
Elliott Hughes
abefc93ff3 Re-expose more stdio implementation details for LP32.
Keeps a variety of apps running.

(cherry-pick of 5def2f5aecd968e4022b0afbe4441fa7ba3e7c7e.)

Bug: 17047819
Change-Id: I55882ec95f2b59a5df76e5a89c23aa315609e01d
2014-09-24 20:07:10 -07:00
Elliott Hughes
5def2f5aec Re-expose more stdio implementation details for LP32.
Keeps a variety of apps running.

Bug: 17047819
Change-Id: I55882ec95f2b59a5df76e5a89c23aa315609e01d
2014-09-24 17:20:53 -07:00
Elliott Hughes
49471f3809 am 567d3fcb: Merge "Switch to OpenBSD fopen/fclose."
* commit '567d3fcb7ece287a84912183e91eff851fa48fc2':
  Switch to OpenBSD fopen/fclose.
2014-09-24 20:44:46 +00:00
Elliott Hughes
d98cac5fbb am 4fcfd3a4: Merge "Sync with current upstream getopt_long.c."
* commit '4fcfd3a474ae5a9e5095ca92a10a8aaa0a3dae5a':
  Sync with current upstream getopt_long.c.
2014-09-24 20:44:45 +00:00
Elliott Hughes
567d3fcb7e Merge "Switch to OpenBSD fopen/fclose." 2014-09-24 20:24:48 +00:00
Elliott Hughes
af12924f67 Sync with current upstream getopt_long.c.
Change-Id: I269195aa581a688fd3eb99552d506b8f5f6a8395
2014-09-24 12:39:34 -07:00
Elliott Hughes
5a69da8d7a Switch to OpenBSD fopen/fclose.
This means all our stdio implementation is now the OpenBSD implementation.
The only thing we lose is the STDIO_THREAD_LOCK calls but they were no-ops
anyway.

We should probably talk to upstream about this. Either fix the locking or,
preferably, encourage them to move away from this pooling (especially since
there's no eviction policy).

Bug: 17154680
Change-Id: Ie2523e444a7d0965b8d141d57e3e11f6432d5b9a
2014-09-24 11:14:36 -07:00
Elliott Hughes
7a2a1a8b6c am f05410ed: Merge "Sync with upstream findfp.c."
* commit 'f05410edc634040f96643b8f378320faddfef423':
  Sync with upstream findfp.c.
2014-09-24 18:09:37 +00:00
Elliott Hughes
f05410edc6 Merge "Sync with upstream findfp.c." 2014-09-24 17:48:59 +00:00
Dan Albert
0d78bad579 am 21db6ff1: Merge "Coverage configs for bionic."
* commit '21db6ff108a8df43582bf2ca0d7d6c925f26b5e5':
  Coverage configs for bionic.
2014-09-24 17:45:54 +00:00
Elliott Hughes
c08c25b4c9 Sync with upstream findfp.c.
Change-Id: Ib298f46de0c4d0fd4ce0a9b456c163e8b8b06342
2014-09-24 10:32:30 -07:00
Dan Albert
21db6ff108 Merge "Coverage configs for bionic." 2014-09-24 17:28:04 +00:00
Dan Albert
c2d39088d8 Coverage configs for bionic.
Bug: 17553780
Change-Id: Iee7d0c210e2379e71e0c1e4e7058bce23f61e8cd
2014-09-24 10:26:41 -07:00
Dan Albert
b14a903421 am fc5a93f7: Merge "Fix incorrect parameter types for locale funcs."
* commit 'fc5a93f7a2ea2be740f2c909e8a6a192fa65adc8':
  Fix incorrect parameter types for locale funcs.
2014-09-24 16:13:50 +00:00
Dan Albert
086bb382db Fix incorrect parameter types for locale funcs.
strtoll(3), strtoull(3), wcstoll(3), and wcstoull(3) all take an _int_
as a base, not a size_t. This is an ABI compatibility issue.

Bug: 17628622
Change-Id: I17f8eead34ce2112005899fc30162067573023ec
(cherry picked from commit 3c5037f1b3)
2014-09-24 09:00:42 -07:00
Dan Albert
fc5a93f7a2 Merge "Fix incorrect parameter types for locale funcs." 2014-09-24 16:00:07 +00:00
Elliott Hughes
f6067fa2e0 am ebf37e38: Merge "Switch to OpenBSD flags.c."
* commit 'ebf37e38861e376ae47c72d45ab8de6703dd18f0':
  Switch to OpenBSD flags.c.
2014-09-24 05:08:23 +00:00
Elliott Hughes
ebf37e3886 Merge "Switch to OpenBSD flags.c." 2014-09-24 04:50:45 +00:00
Christopher Ferris
f5da2641c3 am 04643c18: Merge "Remove the unnecessary generic-neon code."
* commit '04643c181c3256348a6fd78e54c8bc5527ad0b0a':
  Remove the unnecessary generic-neon code.
2014-09-24 04:15:16 +00:00
Christopher Ferris
04643c181c Merge "Remove the unnecessary generic-neon code." 2014-09-24 04:01:23 +00:00
Elliott Hughes
a71b4c3f14 Switch to OpenBSD flags.c.
Change-Id: I0a35e5bd9f8edba27e0c73e5c8150636346d6a81
2014-09-23 20:02:42 -07:00
Elliott Hughes
42317a0e50 am c57e5c82: Merge "CLOEXEC support in fdopen, freopen, and mkostemp/mkostemps."
* commit 'c57e5c828914714a283dd41f0a4adb064f6b8763':
  CLOEXEC support in fdopen, freopen, and mkostemp/mkostemps.
2014-09-24 02:10:59 +00:00
Christopher Ferris
2169e17482 Remove the unnecessary generic-neon code.
Change-Id: Ib75c33caafd76750ec1aca3a74dec5e4b881e965
2014-09-23 18:31:45 -07:00
Elliott Hughes
31165edf57 CLOEXEC support in fdopen, freopen, and mkostemp/mkostemps.
Change-Id: I74ea88e0d4973d6ab3c57da7d8bb643c31592b14
2014-09-23 18:21:52 -07:00
Dan Albert
3c5037f1b3 Fix incorrect parameter types for locale funcs.
strtoll(3), strtoull(3), wcstoll(3), and wcstoull(3) all take an _int_
as a base, not a size_t. This is an ABI compatibility issue.

Bug: 17628622
Change-Id: I17f8eead34ce2112005899fc30162067573023ec
2014-09-23 15:32:24 -07:00
Elliott Hughes
0d44da9eb4 am 87b6906f: Merge "Pull in upstream fixes to reject invalid bases."
* commit '87b6906f6e0c17b2541535be8e054324cc2fef4a':
  Pull in upstream fixes to reject invalid bases.
2014-09-23 22:12:57 +00:00
Elliott Hughes
b05ec5ae93 Pull in upstream fixes to reject invalid bases.
Also add tests to make sure the full set works correctly.

Change-Id: I3e7f237f12c9c93e1185a97c9717803e7e55a73c
2014-09-23 14:53:10 -07:00
Elliott Hughes
3a86c0fd90 am 86421653: Merge "Sync with some upstream OpenBSD #include cleanup."
* commit '8642165344217877b8a70811d19e09b584a0e10a':
  Sync with some upstream OpenBSD #include cleanup.
2014-09-23 21:48:00 +00:00
Elliott Hughes
0c1008b9d8 am 0ab5fd9a: Merge "Switch to OpenBSD insque/remque/killpg."
* commit '0ab5fd9a5af4cd00572e4881f46c1e6f974f657c':
  Switch to OpenBSD insque/remque/killpg.
2014-09-23 21:48:00 +00:00
Elliott Hughes
8642165344 Merge "Sync with some upstream OpenBSD #include cleanup." 2014-09-23 21:27:29 +00:00
Elliott Hughes
49eed7db79 Switch to OpenBSD insque/remque/killpg.
Change-Id: Ie02290ad3187b1c1596dd776fd1c8a743a55f7ef
2014-09-23 14:06:56 -07:00
Elliott Hughes
08dc9d83a2 Sync with some upstream OpenBSD #include cleanup.
Change-Id: Ibcd7adb19e9a6b9ad8c24d77e23935f19f56a144
2014-09-23 13:55:15 -07:00
Elliott Hughes
c65a1d5ee0 am 93951cfa: Merge "Fix a couple more cases of missing CLOEXEC."
* commit '93951cfa96c3c7504a78f94e7ec408936e5db9bf':
  Fix a couple more cases of missing CLOEXEC.
2014-09-23 01:39:11 +00:00
Elliott Hughes
0dc39f9952 Fix a couple more cases of missing CLOEXEC.
The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.

Change-Id: Idba6a4f1d68587ec5b320d1e25f0b6a987ea32a0
2014-09-22 17:43:09 -07:00
Elliott Hughes
1f2e845f9a am b2da4562: Merge "Clean up fpathconf(3)/pathconf(3)."
* commit 'b2da45625353336452112e28872310903dc70a8f':
  Clean up fpathconf(3)/pathconf(3).
2014-09-22 23:05:35 +00:00
Elliott Hughes
a186b2e0ca Clean up fpathconf(3)/pathconf(3).
fpathconf(3) and pathconf(3) can share code. There's no such
header file as <pathconf.h>. glibc/POSIX and BSD disagree about where
the _POSIX_* definitions should go.

Change-Id: I4a67f1595c9f5fbb26700a131178eedebd6bf712
2014-09-22 22:49:40 +00:00
Elliott Hughes
bb54a0d47a am 9f423c55: Merge "Use the uapi fs magic in <sys/vfs.h>."
* commit '9f423c554a0ffcee2e34472bf0bc1aef3621a822':
  Use the uapi fs magic in <sys/vfs.h>.
2014-09-22 17:08:51 +00:00
Elliott Hughes
c296e4f151 Use the uapi fs magic in <sys/vfs.h>.
Change-Id: I712b856a6d786bba400c9a8d08f596b826403731
2014-09-22 09:47:21 -07:00
Elliott Hughes
7d8796feaa am 413de5b0: Merge "Add semaphore tests, fix sem_destroy."
* commit '413de5b0d4ddcf039aaef8b40a5f02d41dbb06e6':
  Add semaphore tests, fix sem_destroy.
2014-09-20 20:06:21 +00:00
Elliott Hughes
413de5b0d4 Merge "Add semaphore tests, fix sem_destroy." 2014-09-20 01:34:11 +00:00
Christopher Ferris
1b0654f4a7 am e7160449: Merge "Remove references to MALLOC_LEAK_CHECK."
* commit 'e716044918d85cd3c34425779a09a24348f7f67a':
  Remove references to MALLOC_LEAK_CHECK.
2014-09-20 00:50:08 +00:00
Elliott Hughes
04303f5a8a Add semaphore tests, fix sem_destroy.
Bug: https://code.google.com/p/android/issues/detail?id=76088
Change-Id: I4a0561b23e90312384d40a1c804ca64ee98f4066
2014-09-19 17:37:06 -07:00
Christopher Ferris
6fe376d392 Remove references to MALLOC_LEAK_CHECK.
This define isn't really used any more.

Bug: 17378595
Change-Id: I39722b83cd98955a3a2514577de34a239524617f
2014-09-19 17:15:12 -07:00
Elliott Hughes
954782240e am adc01348: Merge "Add greg_t for arm64."
* commit 'adc01348ee51a4ad678b1c277f85cbbed5c2e728':
  Add greg_t for arm64.
2014-09-19 18:23:59 +00:00
Elliott Hughes
adc01348ee Merge "Add greg_t for arm64." 2014-09-19 18:01:23 +00:00
Elliott Hughes
8e4d371091 Add greg_t for arm64.
This was already present for the other architectures. I think we skipped
this because glibc seems to have an incorrect definition (int rather than
long), but the kernel has the sane definition (just not in a uapi header).

Change-Id: I0d47a424b505804389853dd8632693dad55a3907
2014-09-19 10:31:49 -07:00
Dan Albert
05ce5ff3f2 am 13d6023a: Merge "Exclude libstdc++ from linked libraries."
* commit '13d6023aac62091a7d1df1c1afa1e228515832cb':
  Exclude libstdc++ from linked libraries.
2014-09-19 00:05:23 +00:00
Dan Albert
13d6023aac Merge "Exclude libstdc++ from linked libraries." 2014-09-18 23:43:24 +00:00
Christopher Ferris
cbf33a9988 am d5e1c583: Merge "Move to v3.16.3 kernel headers."
* commit 'd5e1c583a66a821c7d7e8f43e1238a4569981b90':
  Move to v3.16.3 kernel headers.
2014-09-18 21:48:49 +00:00
Christopher Ferris
653676dde8 Move to v3.16.3 kernel headers.
Change-Id: Ife491bd7630b853a78532dd74e4644438256a3a1
2014-09-18 13:14:58 -07:00
Christopher Ferris
aac37784df am 0bd28a43: Merge "Update kernel uapi headers to v3.16.1."
* commit '0bd28a43dae87c808f6af61ad3dba042b35be7e7':
  Update kernel uapi headers to v3.16.1.
2014-09-18 00:41:24 +00:00
Christopher Ferris
ba8d4f460b Update kernel uapi headers to v3.16.1.
Other changes to support the new headers:

- Remove the flock64 structure it is defined in the new headers.
- Update the syscalls to correspond with the headers.

Change-Id: I49a6b07e8b2bfffb67be71b07b58e4e6848fcc09
2014-09-17 17:05:17 -07:00
Elliott Hughes
8fa377eb6a Fix an unintended difference between aosp/master and lmp-dev-plus-aosp.
Whitespace difference presumably introduced while fixing a merge conflict.

Bug: 17549448
Change-Id: If688330bf1dbaed23ba687d843d9744d6261023b
2014-09-17 15:25:35 -07:00
Elliott Hughes
2ad11a96a1 Fix some 32-bit-isms in <stdio.h>.
(cherry-pick of 2d80400a9e8454038a3ec29959436184be0c4c65.)

Bug: 17157793
Change-Id: I8290e240b92e5617f4c12c0eacad6e622e677b6a
2014-09-17 15:21:10 -07:00
Christopher Ferris
e2d86feb7b Pull input.h from v3.16.1 kernel headers.
(cherry-pick of 027d2717d067c3706f22bf84dc1226ede7c1566d.)

Bug: 17407564
Change-Id: Idcfc40a7254605280e3d5474c61ae1ab7b2b7b51
2014-09-17 15:18:21 -07:00
Elliott Hughes
21ce3f506f More cases where libc should use O_CLOEXEC.
Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
(cherry picked from commit f73183f1a3)
2014-09-17 15:13:35 -07:00
Dan Albert
ebb6b4a4d3 Hide ScopedTrace.
(cherry-pick of f2c1e7ee78a167ff323b9f45d20532d064d6778d.)

Bug: 11156955
Change-Id: I6cddc868d1c6503e30f1ffcf460f45670631d64a
2014-09-17 15:11:25 -07:00
Elliott Hughes
9e87f2f876 Revert "Revert "Added a bionic systrace class and tracing to pthread_mutex.cpp.""
This reverts commit 26c1420fbb.
2014-09-17 14:59:24 -07:00
Dan Albert
3ec67de051 Exclude libstdc++ from linked libraries.
Also explicitly add libstdc++ includes for necessary targets.

Change-Id: If712ba0ae7908d8147a69e29da5c453a183d6540
2014-09-17 14:22:36 -07:00
Elliott Hughes
39f4686461 am 36a5aa05: Merge "Use the kernel\'s sa_restorer for aarch64."
* commit '36a5aa057cf1738577754a3fc16a14a5f817109f':
  Use the kernel's sa_restorer for aarch64.
2014-09-17 17:17:14 +00:00
Elliott Hughes
36a5aa057c Merge "Use the kernel's sa_restorer for aarch64." 2014-09-17 17:04:40 +00:00
Elliott Hughes
0bbd77af89 am 56433ee2: Merge "Clean up the architecture-specific makefiles."
* commit '56433ee2a2ccc097ac3ad753168722b0fc76f3b1':
  Clean up the architecture-specific makefiles.
2014-09-17 17:00:39 +00:00
Elliott Hughes
7c02d9428c Clean up the architecture-specific makefiles.
Group things appropriately and name each group.

Change-Id: I0da45eb0ccde19c31d5e984d0e6eb3dad26630dc
2014-09-16 19:06:31 -07:00
Elliott Hughes
894f7f5819 am 17cc8e53: Merge "No arm source refers to SOFTFLOAT."
* commit '17cc8e539a578184662c1966a60f37c7d4fed65e':
  No arm source refers to SOFTFLOAT.
2014-09-17 00:07:22 +00:00
Elliott Hughes
b1a6c319c4 No arm source refers to SOFTFLOAT.
So why bother #defining it?

Change-Id: I539e91916cee082cacac594ddf628419b737fa9d
2014-09-16 16:27:35 -07:00
Elliott Hughes
1cff9a8964 Use the kernel's sa_restorer for aarch64.
gdb was happy with what we had, but libgcc and libunwind weren't.
libgcc is happy with the kernel's restorer (because of the extra nop),
though libunwind looks like it's going to need code changes regardless.

We could make our restorer more like the kernel's one, but why bother
when we can just let the kernel supply the canonical one?

Bug: 17436734
Change-Id: I330fa5e68f23b1cf8133aa552896657b0b873ed3
2014-09-16 15:49:50 -07:00
Elliott Hughes
67c12a8392 am 380a3be7: Merge "Fix 32-bit arm unwinding through signal frames."
* commit '380a3be757b04378edecad6ecb96017d2ec6a8b9':
  Fix 32-bit arm unwinding through signal frames.
2014-09-16 22:13:34 +00:00
Elliott Hughes
148dff3ec6 Fix 32-bit arm unwinding through signal frames.
gdb was already okay; libgcc and libunwind need a little extra help.

Bug: 17436734
Change-Id: I1f5108f9877373be078554a1ea4938aa4436204e
2014-09-16 14:10:53 -07:00
Elliott Hughes
ca2d1258fc am 5cba3c6f: Merge "Fix signal trampolines."
* commit '5cba3c6f8e571cd4e6e2468263b778a90331101f':
  Fix signal trampolines.
2014-09-16 19:42:51 +00:00
Elliott Hughes
36f451a6d9 Fix signal trampolines.
* LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
  kernels will apparently stop supporting the case where SA_RESTORER isn't
  set.

* gdb and libunwind care about the exact instruction sequences, so we need to
  modify the code slightly in a few cases to match what they're looking for.

* gdb also cares about the exact function names (for some architectures),
  so we need to use __restore and __restore_rt rather than __sigreturn and
  __rt_sigreturn.

* It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
  that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.

This fixes unwinding through a signal handler in gdb for all architectures.
It doesn't fix libunwind for arm and arm64. I'll keep investigating that...

Bug: 17436734
Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
2014-09-15 15:04:14 -07:00
Elliott Hughes
b104f0c438 am 95b0c6a9: Merge "POSIX says <signal.h> gets you ucontext_t."
* commit '95b0c6a9407d7a4084d956e273ad1697550452d3':
  POSIX says <signal.h> gets you ucontext_t.
2014-09-15 22:02:31 +00:00
Elliott Hughes
95b0c6a940 Merge "POSIX says <signal.h> gets you ucontext_t." 2014-09-15 17:17:37 +00:00
Christopher Ferris
07ce976788 am 027d2717: Pull input.h from v3.16.1 kernel headers.
* commit '027d2717d067c3706f22bf84dc1226ede7c1566d':
  Pull input.h from v3.16.1 kernel headers.
2014-09-14 19:51:38 +00:00
Christopher Ferris
027d2717d0 Pull input.h from v3.16.1 kernel headers.
Bug: 17407564
Change-Id: Idcfc40a7254605280e3d5474c61ae1ab7b2b7b51
2014-09-14 12:08:37 -07:00
Elliott Hughes
35981194d8 am 85ef3b5b: Merge "Update NOTICE files."
* commit '85ef3b5b80da353afa24d0ab21c35be01951e0b7':
  Update NOTICE files.
2014-09-13 17:23:58 +00:00
Elliott Hughes
79f40ff929 am ae51accf: Merge "Remove an unused file."
* commit 'ae51accf22a897eecda329202431faa11e0f6015':
  Remove an unused file.
2014-09-13 17:23:57 +00:00
Elliott Hughes
85ef3b5b80 Merge "Update NOTICE files." 2014-09-13 17:01:08 +00:00
Elliott Hughes
5c2264a136 Update NOTICE files.
Change-Id: I37a2c297b318b8e1b1ce8b29a7ccc58ba214708a
2014-09-13 09:42:41 -07:00
Elliott Hughes
5681fe8eae Remove an unused file.
Also remove a reference to it and two other files that have already
been removed in a script --- these files were problematic because they
weren't UTF-8.

Change-Id: Ibf597bac1903c34d8d0fe0a09615c42f24d4f23d
2014-09-13 09:24:28 -07:00
Elliott Hughes
26a8eb50a8 POSIX says <signal.h> gets you ucontext_t.
POSIX also says that ucontext_t's uc_sigmask has type sigset_t.

MIPS64 strace needs this.

The #define is to keep chromium off our lawn; otherwise it tries to redefine
all this stuff itself. We should probably clean that up and remove the #define.

Change-Id: I765d6a765a33dca7db33cd8c40f408dc98e5c95b
2014-09-12 20:47:35 -07:00
Elliott Hughes
934028eba3 am 73d2059f: Merge "Explain why clock(3) isn\'t broken."
* commit '73d2059f9b3f53446e25d800d64a86efb3bf3f9f':
  Explain why clock(3) isn't broken.
2014-09-13 00:16:26 +00:00
Elliott Hughes
f83c208b82 Explain why clock(3) isn't broken.
Bug: 17441123
Change-Id: I6ee9b7f54bab55b1a8760ce9bcaaa6eab1dcc492
2014-09-12 16:33:37 -07:00
Elliott Hughes
ecd6be3bd2 am e39e47c6: Merge "Remove "private/bionic_pthread.h"."
* commit 'e39e47c6b377170d696c6b9b5b523a28c1382ca4':
  Remove "private/bionic_pthread.h".
2014-09-12 20:08:45 +00:00
Dmitriy Ivanov
bb5e2968ca am 66bbf159: Merge "Refactoring: C++11 style DISABLE_ bionic marcos"
* commit '66bbf1595c0fc25d4bc47457d8020b11e135996d':
  Refactoring: C++11 style DISABLE_ bionic marcos
2014-09-12 20:08:41 +00:00
Elliott Hughes
0f001b67fe Remove "private/bionic_pthread.h".
Bug: 17476168
Change-Id: Id642987e641de81e914a28daea4ffe9d11e090ed
2014-09-12 11:35:05 -07:00
Dmitriy Ivanov
66bbf1595c Merge "Refactoring: C++11 style DISABLE_ bionic marcos" 2014-09-12 16:50:05 +00:00
Dmitriy Ivanov
5a6e31c3cb am 6487f0d8: Merge "Add IFUNC support for arm64 and IRELATIVE reloc"
* commit '6487f0d8341b00b476995e0174dc92e5ae8efbbe':
  Add IFUNC support for arm64 and IRELATIVE reloc
2014-09-12 05:59:16 +00:00
Elliott Hughes
da7fe217d8 am 7e00b44e: Expose __swsetup for LP32 binary compatibility.
* commit '7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6':
  Expose __swsetup for LP32 binary compatibility.
2014-09-12 05:48:54 +00:00
Elliott Hughes
66265e80a1 am 27efc488: Add pthread_gettid_np and re-expose __get_thread for LP32.
* commit '27efc48814b8153c55cbcd0af5d9add824816e69':
  Add pthread_gettid_np and re-expose __get_thread for LP32.
2014-09-12 05:48:52 +00:00
Elliott Hughes
5f35710fad Expose __swsetup for LP32 binary compatibility.
(cherry-pick of 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6.)

Bug: 17476127
Change-Id: I0ef1355ac913d782c268a638f88642d6cfc236c2
2014-09-11 18:23:46 -07:00
Dmitriy Ivanov
6487f0d834 Merge "Add IFUNC support for arm64 and IRELATIVE reloc" 2014-09-12 00:40:12 +00:00
Elliott Hughes
7e00b44e80 Expose __swsetup for LP32 binary compatibility.
Bug: 17476127
Change-Id: I0ef1355ac913d782c268a638f88642d6cfc236c2
2014-09-11 16:41:11 -07:00
Dmitriy Ivanov
9aea164457 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
2014-09-11 16:30:45 -07:00
Elliott Hughes
a4831cb4a3 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
2014-09-11 16:22:50 -07:00
Elliott Hughes
27efc48814 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.

Bug: 14079438
Change-Id: I43fabc7f1918250d31d4665ffa4ca352d0dbeac1
2014-09-11 16:11:43 -07:00
Elliott Hughes
5691dcfc0d am ea66004c: Merge "Fix mips __fadvise64.S build failure."
* commit 'ea66004c4a051e40c49314d808e7359634f6c641':
  Fix mips __fadvise64.S build failure.
2014-09-11 17:32:03 +00:00
Elliott Hughes
9e833bf0cf Fix mips __fadvise64.S build failure.
Bug: 12449798

(cherry picked from commit 9990b3973b)

Change-Id: Iba92e2aa262666a59fc38b870dfd9f4082eeb628
2014-09-11 10:15:14 -07:00
Elliott Hughes
9990b3973b Fix mips __fadvise64.S build failure.
Bug: 12449798
Change-Id: I0663b741108ba2f1d286904d6414b3ff4d475551
2014-09-11 10:10:08 -07:00
Elliott Hughes
db1e958109 am 33df10f2: Merge "Add posix_fadvise(3)."
* commit '33df10f284a8adbf58f9734c0f43537db4206b2c':
  Add posix_fadvise(3).
2014-09-11 15:58:49 +00:00
Elliott Hughes
b587f339db Add posix_fadvise(3).
(cherry-pick of 00008263782e484020420c606f7d145fe7d0a4d8.)

Bug: 12449798
Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
2014-09-11 08:45:46 -07:00
Elliott Hughes
176c32787c Merge "Add posix_fadvise(3)." into lmp-dev 2014-09-11 15:43:05 +00:00
Elliott Hughes
0000826378 Add posix_fadvise(3).
Bug: 12449798
Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
2014-09-10 20:30:23 -07:00
Lorenzo Colitti
33a73bfa07 When comparing DNS server configs, also compare number of servers
Bug: 16070602
Change-Id: I605f1cca50b08479ebcad290b3bd179f59be8a96
2014-09-11 08:36:12 +09:00
Lorenzo Colitti
da0ed4cbfa am c71483c0: Merge "When comparing DNS server configs, also compare number of servers"
* commit 'c71483c0b38a6b4f2675f0bffa221dcf175c34ac':
  When comparing DNS server configs, also compare number of servers
2014-09-09 10:42:23 +00:00
Lorenzo Colitti
c71483c0b3 Merge "When comparing DNS server configs, also compare number of servers" 2014-09-09 10:22:18 +00:00
Lorenzo Colitti
bce18c9163 When comparing DNS server configs, also compare number of servers
Bug: 16070602
Change-Id: I605f1cca50b08479ebcad290b3bd179f59be8a96
2014-09-09 19:20:26 +09:00
Dmitriy Ivanov
06bd5e2d0a am 3c3624f3: Merge "Load libraries in breadth-first order"
* commit '3c3624f3df14590e7213d35c3b39a0a11c7d2d34':
  Load libraries in breadth-first order
2014-09-09 01:11:41 +00:00
Dmitriy Ivanov
d9ff722661 Refactoring: C++11 style DISABLE_ bionic marcos
Enable the -std=gnu++11 flag for libstdc++ static and
  dynamic libs.

  ScopeGuard uses DISABLE_ macros instead of '= delete';

Change-Id: I07e21b306f95fffd49345f7fa136cfdac61e0225
2014-09-08 17:51:31 -07:00
Dmitriy Ivanov
3c3624f3df Merge "Load libraries in breadth-first order" 2014-09-09 00:49:38 +00:00
Elliott Hughes
011e111d29 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
2014-09-08 16:46:50 -07:00
Elliott Hughes
cf5fc80c3e Don't expose non-standard basename_r and dirname_r in LP64.
(cherry-pick of f0e9458ea596227720fa745df15f5357f6c0c8f6.)

Bug: 17407423
Change-Id: I47fe499a4c396bf09d7b78fd828728d04777398b
2014-09-08 16:44:48 -07:00
Elliott Hughes
938473a7f0 resolved conflicts for merge of 7efad83d to lmp-dev-plus-aosp
Change-Id: I3994c3c69e187e08d69642e097de14b5040c5b3b
2014-09-08 16:21:24 -07:00
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
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
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
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
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 1c365cb494)

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
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
Dmitriy Ivanov
498eb18b82 Revert "Load libraries in breadth-first order"
This reverts commit a3ad450a2e.

Change-Id: Ia2b838ad2159c643b80c514849582f4b4f4f40e5
2014-09-05 16:27:54 -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
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
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 27a9aed819 plus the
new ScopeGuard.h from a3ad450a2e3fb6b3fe359683b247eba20896f646.)

Bug: 17394276
Change-Id: I5b92dc64ca089400223b2d9a3743e9b9d57c1bc2
2014-09-04 20:34:03 -07:00
Dmitriy Ivanov
4effe38ae6 am 44352f5f: Merge "Revert "Register __libc_fini as early as possible.""
* commit '44352f5f7f06ff9383d695b0a7d4243f5268f430':
  Revert "Register __libc_fini as early as possible."
2014-09-04 23:22:37 +00:00
Dmitriy Ivanov
24d40f2df0 am c0cd9ce5: Merge "Revert "Fix arm64 build""
* commit 'c0cd9ce5df753161aabb393420a8ada8f369b551':
  Revert "Fix arm64 build"
2014-09-04 23:22:37 +00:00
Elliott Hughes
ac5c111924 am 05f0bfd6: Merge "Don\'t mask out SA_RESTORER from sa_flags."
* commit '05f0bfd6c56746aa4f737804ebb62b555dc0d921':
  Don't mask out SA_RESTORER from sa_flags.
2014-09-04 22:20:50 +00:00
Dmitriy Ivanov
44352f5f7f Merge "Revert "Register __libc_fini as early as possible."" 2014-09-04 21:55:59 +00:00
Dmitriy Ivanov
c0cd9ce5df Merge "Revert "Fix arm64 build"" 2014-09-04 21:55:55 +00:00
Dmitriy Ivanov
4b41555ba5 Revert "Register __libc_fini as early as possible."
This reverts commit e880c736d6.

Change-Id: Ide83e442eb5dbfef5298a15bc602c3fe1dda1862
2014-09-04 21:54:34 +00:00
Dmitriy Ivanov
f0d8970435 Revert "Fix arm64 build"
This reverts commit 5c1a7fdbd5.

Change-Id: Ia5fea0d6a8f59700edce0742e2271b5f02a5d87c
2014-09-04 21:53:14 +00:00
Elliott Hughes
afe58ad989 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
2014-09-04 13:54:42 -07:00
Elliott Hughes
32dc56a1ca am 071bed80: Merge "_GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE."
* commit '071bed8091cab4e070a1f5e6b2eb0dd1141f0498':
  _GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE.
2014-09-04 17:16:01 +00:00
Elliott Hughes
fc8974b7aa _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
2014-09-04 08:53:16 -07:00
Dmitriy Ivanov
04ecc77df6 am 1737b159: Merge "Load libraries in breadth-first order"
* commit '1737b159374468a21859d97d8be70a726af0ec9e':
  Load libraries in breadth-first order
2014-09-04 01:48:48 +00:00
Dmitriy Ivanov
1737b15937 Merge "Load libraries in breadth-first order" 2014-09-04 00:59:23 +00:00
Dmitriy Ivanov
f851d60c13 am 8f3b8f52: Merge "Fix arm64 build"
* commit '8f3b8f523ed594b48d28ca0b9a2651d209f29e26':
  Fix arm64 build
2014-09-03 23:47:01 +00:00
Elliott Hughes
d05ad93003 am 58bb54c3: Merge "Add back a dummy arc4random_stir for compatibility."
* commit '58bb54c38bf31fa5cdad8ddbdc44bbed04aaf0cf':
  Add back a dummy arc4random_stir for compatibility.
2014-09-03 23:47:00 +00:00
Dmitriy Ivanov
8f3b8f523e Merge "Fix arm64 build" 2014-09-03 23:36:35 +00:00
Dmitriy Ivanov
5c1a7fdbd5 Fix arm64 build
Bug: 14611536
Change-Id: I4f7f4d1f5c0a37ef38fa0956778393f8d7668512
2014-09-03 16:33:08 -07:00
Elliott Hughes
5dea47221a 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
2014-09-03 16:30:22 -07:00
Elliott Hughes
1e010d6039 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.

Bug: 17291075
Change-Id: Iaf6171c3ec65c39c1868364d5b35ea280e29a363
2014-09-03 15:53:11 -07:00
Dmitriy Ivanov
bd00ae8992 am 450aaa01: Merge "Register __libc_fini as early as possible."
* commit '450aaa018df19464cb4e01ea3059a2a075ebde52':
  Register __libc_fini as early as possible.
2014-09-03 22:44:15 +00:00
Dmitriy Ivanov
e880c736d6 Register __libc_fini as early as possible.
We want __libc_fini to be called after all the destructors.

Bug: 14611536
Change-Id: Ibb83a94436795ec178fd605fa531ac29608f4a3e
2014-09-03 15:27:29 -07:00
Dmitriy Ivanov
a3ad450a2e 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
2014-09-03 15:06:14 -07:00
Hans Boehm
5c2c544382 am 9ac60bf8: Make stdatomic.h work with gcc4.6 host compiler
* commit '9ac60bf82b1f0e316666b862e9924f90caa60342':
  Make stdatomic.h work with gcc4.6 host compiler
2014-09-03 05:07:24 +00:00
Andreas Gampe
c16f0486fc resolved conflicts for merge of 2b10e2f1 to lmp-dev-plus-aosp
Change-Id: Ia41583773abbbe1f52d72d1e7f4b925e621d28ff
2014-09-02 22:02:48 -07:00
Elliott Hughes
cb093d1f55 Merge "Upgrade bionic to tzdata2014g." into lmp-dev 2014-09-02 21:39:03 +00:00
Elliott Hughes
6c69675423 am ec95a9cf: Merge "MIPS64 syscall() arguments"
* commit 'ec95a9cf11f7c4d2211c61da7ce05262a54409d1':
  MIPS64 syscall() arguments
2014-09-02 21:18:55 +00:00
Chris Dearman
296895f1a9 MIPS64 syscall() arguments
The seventh argument for syscall is passed in a register, not on the stack

Change-Id: Idb69fac77d1f710cff5a3ab4ae1259feb61ae69d
2014-09-02 12:41:01 -07:00
Hans Boehm
9ac60bf82b 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 00aaea3645 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
(cherry picked from commit 32429606bf)
2014-09-02 11:37:02 -07:00
Elliott Hughes
b519ea4903 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

(cherry picked from commit 9685c30a23)

Change-Id: I6120be3a0ec76af2d07ca6f9ea6f83d81d215803
2014-09-02 11:33:16 -07:00
Elliott Hughes
a5d70a4b15 am 4625dd75: Merge "Upgrade bionic to tzdata2014g."
* commit '4625dd751e5f7beb0a9b8ec6a768fc7a2c36367a':
  Upgrade bionic to tzdata2014g.
2014-09-02 18:29:15 +00:00
Hans Boehm
2b10e2f122 Undefine _Atomic before redefining
Stdatomic.h was potentially redefining _Atomic, in spite of a
prior definition by <atomic>.  This could cause g++ builds that
included <stdatomic.h> with an available <atomic> header to break.

A functional stdatomic.h is a prerequisite for fixing the
following bugs.  This is the middle of 3 AOSP updates to
bionics stdatomic.h that are needded to get there.

Bug:16880454
Bug:16513433

Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8
(cherry picked from commit 3e4a0099a1)
2014-09-02 10:32:34 -07:00
Hans Boehm
c8cf3513ec Fix, generalize stdatomic.h; improve test.
We seem to use this stdatomic.h sometimes, and slightly different prebuilts
at other times, making them all difficult to test, and making it unclear
which one we're testing.  This generalizes the bionic header so that it
can be used directly as the prebuilt header as well.  So long as they
don't diverge again, that should somewhat improve test coverage.

Use the correct builtin for atomic_is_lock_free.

Fix atomic_flag_init.

Turn on atomic tests even with __GLIBC__, since they now appear to pass.

Include uchar.h in stdatomic.h where needed.

Add a basic memory ordering test.

Fix bit-rotted comments in bionic tests makefile.

Prerequisite for fixing b/16880454 and

Bug:16513433

Change-Id: If6a14c1075b379395ba5d93357d56025c0ffab68
(cherry picked from commit 00aaea3645)
2014-09-02 10:32:33 -07:00
Elliott Hughes
9685c30a23 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
2014-09-02 09:51:04 -07:00
Hans Boehm
94ea04c50a am e505cc66: Merge "Make stdatomic.h work with gcc4.6 host compiler"
* commit 'e505cc66a6e03f4ba460de3500f8b272421482c1':
  Make stdatomic.h work with gcc4.6 host compiler
2014-08-30 01:25:10 +00:00
Hans Boehm
32429606bf 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 00aaea3645 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
2014-08-29 17:03:26 -07:00
Elliott Hughes
e21a624269 am bbe06e0d: Merge "Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc."
* commit 'bbe06e0da1742e9bdc52d3246ffa9f2ab3ce999a':
  Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
2014-08-29 23:30:14 +00:00
Elliott Hughes
b2eb09a9ed Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Bug: 16874785

(cherry picked from commit e0c56efddf)

Change-Id: I9c922ba019f648766fc399d1c4e35e789e25acd4
2014-08-29 16:10:57 -07:00
Elliott Hughes
e0c56efddf Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Bug: 16874785
Change-Id: I8512f8be3fd149d8720c5c3b4657bedd5ce2b1d1
2014-08-29 15:54:11 -07:00
Chih-Hung Hsieh
46623c1cc7 am cc4259ed: Merge "Ignore all __weak_alias in OpenBSD libC."
* commit 'cc4259ed9254ae66f63cacc3ad50963c4058eb1c':
  Ignore all __weak_alias in OpenBSD libC.
2014-08-29 11:39:56 +00:00
Elliott Hughes
cd6657f9ea am 29f06943: Merge "Add GNU-compatible strerror_r."
* commit '29f06943a19ef2271a08f4223f597a3383f0d9c0':
  Add GNU-compatible strerror_r.
2014-08-29 11:39:55 +00:00
Chih-Hung Hsieh
cc4259ed92 Merge "Ignore all __weak_alias in OpenBSD libC." 2014-08-29 03:10:44 +00:00
Elliott Hughes
416d7ddaff 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
2014-08-28 16:37:09 -07:00
Chih-Hung Hsieh
b6b5cb5389 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
2014-08-28 15:10:01 -07:00
Elliott Hughes
9560aaba8f am f4e721dd: Merge "Have pthread_attr_getstack for the main thread report RLIMIT_STACK..."
* commit 'f4e721dd519db89c504c8944763811a3df956b32':
  Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
2014-08-28 00:00:07 +00:00
Elliott Hughes
67f1f3b171 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

(cherry picked from commit 9e4ffa7032)

Change-Id: I73f219a569917b2e4546c09436d7ef5231facc07
2014-08-27 16:50:53 -07:00
Elliott Hughes
a0eeb0b69f Merge "Fix pthread_getattr_np for the main thread." into lmp-dev 2014-08-27 23:49:56 +00:00
Elliott Hughes
f4e721dd51 Merge "Have pthread_attr_getstack for the main thread report RLIMIT_STACK..." 2014-08-27 23:43:27 +00:00
Chih-Hung Hsieh
2c449617c3 am fbe9d3df: Merge "Fix strlen function type for mips."
* commit 'fbe9d3dfeb0e09c0e4aa3221aace8249c0efe881':
  Fix strlen function type for mips.
2014-08-27 23:24:27 +00:00
Chih-Hung Hsieh
fbe9d3dfeb Merge "Fix strlen function type for mips." 2014-08-27 23:09:30 +00:00
Chih-Hung Hsieh
15b914c8f3 Fix strlen function type for mips.
Clang complains about incompatible-library-redeclaration.

BUG: 17302369
Change-Id: I3ae36f24846408c6464b84b5bddb1747e1e4a971
2014-08-27 16:00:46 -07:00
Chih-Hung Hsieh
e561e5db73 am 4f8268e3: Merge "Replace ambiguous cmp instruction with cmpl."
* commit '4f8268e38f151724722bcb489c32185a93fd86ba':
  Replace ambiguous cmp instruction with cmpl.
2014-08-27 23:00:09 +00:00
Chih-Hung Hsieh
4f8268e38f Merge "Replace ambiguous cmp instruction with cmpl." 2014-08-27 22:46:07 +00:00
Elliott Hughes
9e4ffa7032 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
2014-08-27 15:32:01 -07:00
Chih-Hung Hsieh
857fa6b2a3 Replace ambiguous cmp instruction with cmpl.
Clang assembler rejects ambiguous cmp instruction.

BUG: 17302482
Change-Id: I74f49de87464541f9fe6fa288e4093a9fbf37120
2014-08-27 15:04:23 -07:00
Christopher Ferris
b78e60e7b7 Use the default unwind code.
This speeds up the debug malloc code by using the original unwinding code.
The only catch is that it has to link in the libc++ arm unwind code or
there will be crashes when attempting to unwind through libc++ compiled
code.

Bug: 16874447

(cherry picked from commit 3f7635f490)

Change-Id: If8a3821cdd95ed481bb496bf2daab449d13790f8
2014-08-27 13:13:21 -07:00
Elliott Hughes
7a9471d815 am 64ae11ab: Merge "Switch to OpenBSD <err.h> implementation."
* commit '64ae11ab766421fe2c49ebdecb14c36fe0a047fe':
  Switch to OpenBSD <err.h> implementation.
2014-08-27 17:39:28 +00:00
Christopher Ferris
7bad1a90f1 am 3f7635f4: Use the default unwind code.
* commit '3f7635f4906c53fa744731efc35235456b7d93bf':
  Use the default unwind code.
2014-08-27 04:46:05 +00:00
Hans Boehm
3b32ba0e2c am 6bfcefe0: Merge "Undefine _Atomic before redefining"
* commit '6bfcefe02f8fbeec1f6790bd5ebb1fdd5dba1e33':
  Undefine _Atomic before redefining
2014-08-27 00:01:46 +00:00
Elliott Hughes
d961078f2d am 07401c71: Merge "Switch to OpenBSD daemon(3)."
* commit '07401c7136af113304a22f4a8245ef3fc1b6929b':
  Switch to OpenBSD daemon(3).
2014-08-27 00:01:45 +00:00
Elliott Hughes
cc7e5f489f Switch to OpenBSD <err.h> implementation.
Change-Id: Ia950d88871a30f68e74f9ac7dbd87788e128e02f
2014-08-26 17:00:37 -07:00
Elliott Hughes
f975bc2d59 am 7b87d441: Merge "Switch to OpenBSD res_random."
* commit '7b87d441b0f2aa3ad5021ab6bd879a995a1bc2ce':
  Switch to OpenBSD res_random.
2014-08-26 23:41:23 +00:00
Elliott Hughes
06b033942a am 59de803a: Merge "libc should use O_CLOEXEC when opening files for its own use."
* commit '59de803af98a284378303489f614be3e53800b3f':
  libc should use O_CLOEXEC when opening files for its own use.
2014-08-26 23:41:23 +00:00
Hans Boehm
6bfcefe02f Merge "Undefine _Atomic before redefining" 2014-08-26 23:34:49 +00:00
Elliott Hughes
07401c7136 Merge "Switch to OpenBSD daemon(3)." 2014-08-26 23:33:43 +00:00
Elliott Hughes
e5055179fd Switch to OpenBSD daemon(3).
Change-Id: I1fd0be09fdb24aa6f1d945410eba5987f8a949b4
2014-08-26 16:25:19 -07:00
Elliott Hughes
f73183f1a3 More cases where libc should use O_CLOEXEC.
Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
2014-08-26 16:20:59 -07:00
Elliott Hughes
7b87d441b0 Merge "Switch to OpenBSD res_random." 2014-08-26 23:18:04 +00:00
Christopher Ferris
3f7635f490 Use the default unwind code.
This speeds up the debug malloc code by using the original unwinding code.
The only catch is that it has to link in the libc++ arm unwind code or
there will be crashes when attempting to unwind through libc++ compiled
code.

Bug: 16874447
Change-Id: Ifdbbcbd4137d668b25cf3c2bd59535e06ebfa5a7
2014-08-26 16:02:51 -07:00
Hans Boehm
3e4a0099a1 Undefine _Atomic before redefining
Stdatomic.h was potentially redefining _Atomic, in spite of a
prior definition by <atomic>.  This could cause g++ builds that
included <stdatomic.h> with an available <atomic> header to break.

Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8
2014-08-26 15:58:15 -07:00
Elliott Hughes
c674edbf27 libc should use O_CLOEXEC when opening files for its own use.
Change-Id: I159f1d57e0ca090d837f57854fcef5879b8b8248
2014-08-26 15:56:54 -07:00
Elliott Hughes
05409dedcd am c764fb24: Merge "Fix pthread_getattr_np for the main thread."
* commit 'c764fb24ccb47e05d8e140cde5b4111225790ef1':
  Fix pthread_getattr_np for the main thread.
2014-08-26 20:08:44 +00:00
Elliott Hughes
6421823410 Fix pthread_getattr_np for the main thread.
On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)

It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.

This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.

Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>

(cherry picked from commit 57b7a6110e)

Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4
2014-08-26 12:55:01 -07:00
Elliott Hughes
c764fb24cc Merge "Fix pthread_getattr_np for the main thread." 2014-08-26 19:53:40 +00:00
Elliott Hughes
57b7a6110e Fix pthread_getattr_np for the main thread.
On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)

It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.

This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.

Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Change-Id: I1d4dbffe7bc7bda1d353c3a295dbf68d29f63158
2014-08-26 10:36:38 -07:00
Chih-Hung Hsieh
a9c435e072 am 9e307af9: Merge "Add standard throw() spec to delete operators."
* commit '9e307af982ea9030849293b5e3307733289e3c2c':
  Add standard throw() spec to delete operators.
2014-08-25 22:29:24 +00:00
Chih-Hung Hsieh
ae558d6b4b Add standard throw() spec to delete operators.
Without these specs, clang will reports mismatch between standard definitions and these declarations/definitions. These specs are ignored when compiled with -fno-exceptions.

BUG: 17136236
Change-Id: I386c712a61dc4fc74dfde45f9ec2d3d037f2e9f1
2014-08-25 21:16:14 +00:00
Hans Boehm
685c722d32 am a4a8c4fe: Merge "Fix, generalize stdatomic.h; improve test."
* commit 'a4a8c4feb8cf3cebf8aceace70e699e128095b5c':
  Fix, generalize stdatomic.h; improve test.
2014-08-22 23:15:54 +00:00
Hans Boehm
a4a8c4feb8 Merge "Fix, generalize stdatomic.h; improve test." 2014-08-22 22:52:31 +00:00
Hans Boehm
00aaea3645 Fix, generalize stdatomic.h; improve test.
We seem to use this stdatomic.h sometimes, and slightly different prebuilts
at other times, making them all difficult to test, and making it unclear
which one we're testing.  This generalizes the bionic header so that it
can be used directly as the prebuilt header as well.  So long as they
don't diverge again, that should somewhat improve test coverage.

Use the correct builtin for atomic_is_lock_free.

Fix atomic_flag_init.

Turn on atomic tests even with __GLIBC__, since they now appear to pass.

Include uchar.h in stdatomic.h where needed.

Add a basic memory ordering test.

Fix bit-rotted comments in bionic tests makefile.

Change-Id: If6a14c1075b379395ba5d93357d56025c0ffab68
2014-08-22 15:50:17 -07:00
Dan Albert
740cf634f7 am 0b9fa4c9: Merge "Fix dlmalloc build."
* commit '0b9fa4c9bff5d3128f120a2008aa6997c7363b49':
  Fix dlmalloc build.
2014-08-22 18:25:06 +00:00
Dan Albert
ef619cc083 Fix dlmalloc build.
Change-Id: Ied542c40867ab443cdd2076bd2e535b00c4854e4
2014-08-22 11:05:48 -07:00
Dan Albert
a2dcd9449e am 4756afe3: Merge "Implement malloc_info(3)."
* commit '4756afe3d5017b50c89761c47f0da17a6799c81e':
  Implement malloc_info(3).
2014-08-22 18:04:08 +00:00
Dan Albert
4756afe3d5 Merge "Implement malloc_info(3)." 2014-08-22 17:39:18 +00:00
Dan Albert
4caa1f0977 Implement malloc_info(3).
Expose jemalloc stats through the malloc_info(3) interface.

Bug: 16874689
Change-Id: I4358ac283002e60ff161107028d1a3fb1e9afb0a
2014-08-22 10:23:12 -07:00
Dan Albert
ab537ae574 am 2e6c5fc4: Merge "Remove _flush_cache(2) for mips64."
* commit '2e6c5fc4e903b6ef58bd94e13e51b3f0aa4689b3':
  Remove _flush_cache(2) for mips64.
2014-08-21 22:12:30 +00:00
Dan Albert
2e6c5fc4e9 Merge "Remove _flush_cache(2) for mips64." 2014-08-21 21:51:42 +00:00
Dmitriy Ivanov
87c5f24e4e am 2bd88d45: Merge "Run constructors before resolving ifunc functions"
* commit '2bd88d450ead2ad8b44a76126c720cf4a9772002':
  Run constructors before resolving ifunc functions
2014-08-21 21:45:24 +00:00
Dmitriy Ivanov
9598b8c415 Run constructors before resolving ifunc functions
Bug: 17177284
Change-Id: I5714b9bc2d1ca8f8711806bfb68da3d524213e99
2014-08-21 14:24:13 -07:00
Dan Albert
47793d6a29 Remove _flush_cache(2) for mips64.
Also remove declaration.

The only user is compiler-rt, and they can replace that call with one to
syscall(2). compiler-rt doesn't currently build on mips64 anyway.

Bug: 11156955
Change-Id: Ieae0ba49c8e7aa50253401fc1d7c2d17bc867d39
2014-08-21 13:32:37 -07:00
Dan Albert
ba8dede858 am 31572118: Merge "__gnu_basename(3) is accounted for."
* commit '3157211849f808f89a7f1465fd60d6b41917ee4f':
  __gnu_basename(3) is accounted for.
2014-08-21 19:33:19 +00:00
Dan Albert
2320b02c7d __gnu_basename(3) is accounted for.
Change-Id: I3836b14a797c4a8d121c6d29d95791ac768257da
2014-08-21 11:36:07 -07:00
Elliott Hughes
d00ce65a16 am 2d80400a: Fix some 32-bit-isms in <stdio.h>.
* commit '2d80400a9e8454038a3ec29959436184be0c4c65':
  Fix some 32-bit-isms in <stdio.h>.
2014-08-21 18:25:59 +00:00
Elliott Hughes
1fa71e6cbb am d5fbc371: Merge "Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream."
* commit 'd5fbc37119ef6cd757ceb449cb071ee03c66590e':
  Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream.
2014-08-21 03:11:32 +00:00