10315 Commits

Author SHA1 Message Date
Dmitriy Ivanov
8de1ddece0 Fix order of soinfo links (repairs libcxx tests).
(cherry picked from commit b2a30ee8d209154efc367db11b4167a5d6db605f)

Change-Id: I59c5333bc050cbbea14051cea9220be2f64ee383
2014-10-01 16:00:41 -07:00
Dmitriy Ivanov
59c12a6527 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

(cherry picked from commit a3ad450a2e3fb6b3fe359683b247eba20896f646)

Change-Id: I1125de10272c84e4f075cbc72859c1f6b3e89943
2014-10-01 16:00:29 -07:00
Chih-Hung Hsieh
81fe2b16dc 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

(cherry picked from commit b58db8b083ce41798a5310616e4f20885cec611f)

Change-Id: I916c05056d37a9c287b0a5ae3b1a209d98c8f70e
2014-10-01 15:57:09 -07:00
Dmitriy Ivanov
7210c41fdc Encapsulate soinfo_link_image and soinfo_relocate
Also get rid of needed[] array for these functions

(cherry picked from commit 29bbc9dd4c606de9187e46d8899a2a744715c967)

Change-Id: Id208621f66afa2e02a6b3facacee7d874466d81b
2014-10-01 15:56:44 -07:00
Dmitriy Ivanov
4466bd72fb Implement LinkedList::visit()
(cherry picked from commit a4926058496c1c24c00ac07e42d45048dac7c487)

Change-Id: I59554be45c910bfe33494016595a5ade9daad230
2014-10-01 15:56:23 -07:00
Dmitriy Ivanov
ff01f6fcce Introduce size-based r/w allocators
(cherry picked from commit 0cd83ebb0e9784827d9ec0a8028a710e73a28b2b)

Change-Id: Ib037bd5313c9a78b6051482f14e789aa820b4dd1
2014-10-01 15:55:58 -07:00
Dmitriy Ivanov
4d01d08c29 Erase elements in LinkedList::remove_if
(cherry picked from commit 4bea498544bb1377f610520d7f58856382a6e5fc)

Change-Id: I1ffe248bc2b7572f38fbd987e9c6db5ecbd4559d
2014-10-01 15:55:35 -07:00
Dmitriy Ivanov
cfad7ae934 Replace NULL with nullptr
(cherry picked from commit 851135bf9941b3813adb9b4f43d76e040c4ba157)

Change-Id: Ic4997907680db7472ef38ffb0f0ca66fff37b797
2014-10-01 15:54:26 -07:00
Dmitriy Ivanov
5dfe802d0d Remove unnecessary calls to LinkedList::clear()
(cherry picked from commit 608217e1674d8fd8b334fe18c753b6c4638ed783)

Change-Id: I031359d79b2e77977ace197ef410e41539dc0ce6
2014-10-01 15:53:07 -07:00
Dmitriy Ivanov
93c3f4203c Enable __cxa_atexit && __cxa_finalize for linker
This allows adding destructors to classes used
 for global variables.

(cherry picked from commit 14241402de0faa4b244b1bd6b1f0799ce169b880)

Change-Id: I1d8776130d1e01a8c53d23a2949f5010f4c96b16
2014-10-01 15:52:38 -07:00
Dmitriy Ivanov
3bbd218ef1 Bump soinfo version
This includes:
 1. Placing has_ifunc after fields with version = 0
 2. Switch to has_min_version(v) function.
 3. Minor soinfo initialization refactoring (placement new + ctor)

(cherry picked from commit 0d15094287fe0f288d9c258953143fc1998b6b5a)

Change-Id: Idf135fdd3d4826b5653f32add2adc6db5d4a4f95
2014-10-01 15:52:15 -07:00
Dmitriy Ivanov
bd321c1106 Run constructors before resolving ifunc functions
Bug: 17177284

(cherry picked from commit 9598b8c415e2fa9f240508185fe8c964b83f538d)

Change-Id: I2c9631ee1cd77f8cf95ec0216a35b605c8786454
2014-10-01 15:51:47 -07:00
Brigid Smith
31b88da843 Added test for ifunc support in dynamic linker.
ifuncs now work in i386 and x86_64 when called in the same library as
well as in a different library.

Bug:6657325
(cherry picked from commit c5a13efa9bc4264be0a9a9e37c00633af01584ed)

Change-Id: I321d780bc2f9bd1baa749e1acacd2683aefe827b
2014-10-01 15:50:38 -07:00
Elliott Hughes
e4f8962ab5 Merge "Update bionic to tzdata 2014h." into lmp-mr1-dev 2014-10-01 18:02:51 +00:00
Elliott Hughes
d18205049d 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

(cherry picked from commit 0c8fb51e6b8cfcd00d453cb5ebfa516f02009854)

Change-Id: Icf8a9cbd309951b4ffc20c74eb1e78c1e39c222f
2014-10-01 10:21:07 -07:00
Elliott Hughes
b5f5b0e418 Fix update-tzdata.py to rebuild icu4c .dat file.
Bug: 17731498

(cherry picked from commit f8896c6c93fd698b129742780878123a3a19ae07)

Change-Id: If97e1ccf593a2ed6c2356077e660d6fd88a05875
2014-10-01 10:07:24 -07:00
The Android Automerger
dd4b377612 merge in lmp-mr1-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0 2014-10-01 06:09:15 -07:00
The Android Automerger
f9c31b1115 merge in lmp-mr1-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0 2014-09-30 06:09:53 -07:00
The Android Automerger
e09a9d77d2 merge in lmp-mr1-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0 2014-09-29 06:09:50 -07:00
The Android Automerger
bc04ede139 merge in lmp-mr1-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0 2014-09-28 06:08:54 -07:00
The Android Automerger
fe054482cc merge in lmp-mr1-release history after reset to aaad548535c34e2bba16b2a0b71173e0ae4b16c0 2014-09-27 06:09:13 -07:00
The Android Automerger
a950f53fc3 merge in lmp-mr1-release history after reset to 086bb382db3de7459bc5fad6bb1c257ca331b0e8 2014-09-25 06:09:36 -07:00
Elliott Hughes
aaad548535 Merge "Re-expose more stdio implementation details for LP32." into lmp-dev 2014-09-25 03:06:30 +00: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
Christopher Ferris
6c69afdb6d Fix sys_stat.mkfifo when not run as root.
It's not allowed for a shell user to create a fifo in /data/local/tmp.
Make the test do nothing if not run as root.

Bug: 17646702
Change-Id: I932262fa233eae8b5dd607a2398a47c50a208701
2014-09-24 16:01:18 -07: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 3c5037f1b3b747e79d17a5f717d9f9c365132d33)
2014-09-24 09:00:42 -07:00
The Android Automerger
e647a62805 merge in lmp-mr1-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-24 06:09:48 -07:00
The Android Automerger
bc2fb531b7 merge in lmp-mr1-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-23 15:13:51 -07:00
The Android Automerger
460c53d4d4 merge in lmp-mr1-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-23 04:45:29 -07:00
The Android Automerger
8f0c298a3d merge in lmp-mr1-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-22 11:44:31 -07:00
The Android Automerger
d830465de8 merge in lmp-mr1-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-22 11:13:42 -07:00
The Android Automerger
306d80e339 merge in lmp-mr1-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-22 10:17:00 -07:00
The Android Automerger
6078d68321 merge in lmp-release history after reset to 027d2717d067c3706f22bf84dc1226ede7c1566d 2014-09-15 06:09:45 -07: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
The Android Automerger
277c1b00f5 merge in lmp-release history after reset to 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6 2014-09-14 06:09:35 -07:00
The Android Automerger
50982fd0c4 merge in lmp-release history after reset to 1d12f186edcaaf6ebd6ace1929baa23ce97a2ab8 2014-09-13 08:42:01 -07:00
The Android Automerger
25232c43fc merge in lmp-release history after reset to 7e00b44e80d6e38b8ab86d0ebc86b666c0ac2ef6 2014-09-13 06:09:46 -07:00
Elliott Hughes
7e00b44e80 Expose __swsetup for LP32 binary compatibility.
Bug: 17476127
Change-Id: I0ef1355ac913d782c268a638f88642d6cfc236c2
2014-09-11 16:41:11 -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
9e833bf0cf Fix mips __fadvise64.S build failure.
Bug: 12449798

(cherry picked from commit 9990b3973bdfcda5419c06886215147a878222f1)

Change-Id: Iba92e2aa262666a59fc38b870dfd9f4082eeb628
2014-09-11 10:15:14 -07:00
Elliott Hughes
176c32787c Merge "Add posix_fadvise(3)." into lmp-dev 2014-09-11 15:43:05 +00:00
The Android Automerger
1d12f186ed merge in lmp-release history after reset to 33a73bfa0712c483830e4c9abbf4d6a0551478bf 2014-09-11 06:09:09 -07: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
The Android Automerger
fab4d76b46 merge in lmp-release history after reset to 7efad83d430f4d824f2aaa75edea5106f6ff8aae 2014-09-10 06:09:15 -07:00
The Android Automerger
604b2f5789 merge in lmp-release history after reset to 7efad83d430f4d824f2aaa75edea5106f6ff8aae 2014-09-09 06:09:23 -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
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
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
The Android Automerger
ddca20bda4 merge in lmp-release history after reset to 47ed03f70c6c9addc7f05e4ee4dc71c96d215105 2014-09-08 06:09:42 -07:00