10281 Commits

Author SHA1 Message Date
The Android Automerger
26df9bf109 merge in lmp-mr1-release history after reset to 02542b3bbd6370e904e6bccba1032185b9f0eb75 2014-10-06 06:08:57 -07:00
The Android Automerger
4877fe15c2 merge in lmp-mr1-release history after reset to 02542b3bbd6370e904e6bccba1032185b9f0eb75 2014-10-05 06:08:48 -07:00
Alex Van Brunt
02542b3bbd am a5087148: Reimplement clock(3) using clock_gettime(3)
* commit 'a508714800242b294291060641ed35d719bdc857':
  Reimplement clock(3) using clock_gettime(3)
2014-10-04 16:44:11 +00:00
The Android Automerger
975164af3c merge in lmp-mr1-release history after reset to 22f5a61d9528219accd03dc6ed920a238088795a 2014-10-04 06:09:07 -07:00
Alex Van Brunt
a508714800 Reimplement clock(3) using clock_gettime(3)
Unlike times(), clock_gettime() is implemented as a vDSO on many architectures.
So, using clock_gettime() will return a more accurate time and do so with less
overhead because it does have the overhead of calling into the kernel.

It is also significantly more accurate because it measures the actual time in
nanoseconds rather than the number of ticks (typically 1 millisecond or more).

Bug: 17814435

(cherry picked from commit 8d0b2dbf2154d5da17ff09b1d4f864d281362ad2)

Change-Id: Id4945d9f387330518f78669809639952e9227ed9
2014-10-03 19:05:52 -07:00
Elliott Hughes
22f5a61d95 am ea9800e9: Explain why clock(3) isn\'t broken.
* commit 'ea9800e98598c71fe76c4e2a0d0498b6bd490a83':
  Explain why clock(3) isn't broken.
2014-10-04 00:06:27 +00:00
Elliott Hughes
ea9800e985 Explain why clock(3) isn't broken.
Bug: 17441123
Bug: 17814435

(cherry picked from commit f83c208b82c78dad07f4065f63bdd354f5ef9951)

Change-Id: I2065afe73b79a8d86404edee16e983625d902cdc
2014-10-03 16:46:20 -07:00
Ningsheng Jian
04f5f4100c Fix gdb could not get shared library list issue
Get dynamic flags from phdr table's correct entry rather the first
entry, so that the following DT_DEBUG entry can be set.

Also fix the undefined reference to LoadTask::deleter issue under gcc
-O0 option.

Bug: 17524778

(cherry picked from commit e93be99da0614ff38cbf8b2bb0624ff1dc79b8d0)

Change-Id: I347792dab25c7b19c3fc690e03d20899ce1e26e0
2014-10-02 15:35:47 -07:00
The Android Automerger
1f5a9a4b35 merge in lmp-mr1-release history after reset to e4f8962ab5b4fb64842f4635fdf01a860bb180ee 2014-10-02 06:09:27 -07:00
Dmitriy Ivanov
1cd0c6777f L-MR1 specific fixes
Reset soinfo version to 0.
 Disable ifunc test for arm64 because of old toolchain
 in lmp-mr1-dev branch

 Note: this commit should be reverted in -plus-aosp branch.

Change-Id: I2d6d996d43bc35d5d4975c745779f43a988b31e6
2014-10-01 16:26:49 -07:00
Dmitriy Ivanov
7d971ec14b Fix unload of recursively linked library
Expanded test for recursive libs. Fixed bug with unnecessary
  soinfo_free of already loaded library.

(cherry picked from commit a6ac54a215d6b64f5cc5a59b66c1dbfbb41ea9f5)

Change-Id: I6907c723d9fbdf6b2777f3f236b1e29b0843edd6
2014-10-01 16:04:58 -07:00
Dmitriy Ivanov
f4cb631364 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

(cherry picked from commit 9aea164457c269c475592da36b4655d45f55c7bc)

Change-Id: Ie19d900fc203beb93faf8943b0d06d534a6de4ad
2014-10-01 16:04:31 -07:00
Dmitriy Ivanov
ef1306d777 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';

(cherry picked from commit d9ff7226613014056c9edd79a68dc5af939107a0)

Change-Id: If2573d080770e18b36b56106f2369f7bb682cd3c
2014-10-01 16:03:51 -07:00
Dmitriy Ivanov
61c4147fa8 Reset enviroment for math_tests
Bug: 17390824

(cherry picked from commit 7b956ede3f0f40bd8a085a8ad3729bb3e0e030f2)

Change-Id: I5d804ceb5e69533584161bfed6787529cd8296fb
2014-10-01 16:03:40 -07:00
Dmitriy Ivanov
ae69a9584b 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
Attempt: 2

(cherry picked from commit 14669a939d113214a4a20b9318fca0992d5453f0)

Change-Id: Id87540c96a2242220967b6fa5d84ddcd829e2b97
2014-10-01 16:01:28 -07:00
Dmitriy Ivanov
c0133a73b6 Revert "Load libraries in breadth-first order"
This reverts commit a3ad450a2e3fb6b3fe359683b247eba20896f646.

(cherry picked from commit 498eb18b82a425f9f30132e4832f327b2ee0e545)

Change-Id: Iec7eab83d0c0ed1604e1e8ea3f9e9d0ce1d29680
2014-10-01 16:00:52 -07:00
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