11203 Commits

Author SHA1 Message Date
Nick Kralevich
48be71d02b string.h: remove unused variable
Change-Id: I08b7dab1b374ad427fcbee4183f2c7d93d0199a9
2014-10-04 15:20:00 -07:00
Dmitriy Ivanov
cd9165e649 resolved conflicts for merge of 02542b3b to lmp-mr1-dev-plus-aosp
Change-Id: Ib881abd163fd737719b665c447055c7883a7b791
2014-10-04 11:16:42 -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
Elliott Hughes
5f86872e67 am 4ef0e59f: Merge "Reimplement clock(3) using clock_gettime(3)"
* commit '4ef0e59f339ad138eabe3bc408beda6004f5ea83':
  Reimplement clock(3) using clock_gettime(3)
2014-10-04 02:17:19 +00: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
4ef0e59f33 Merge "Reimplement clock(3) using clock_gettime(3)" 2014-10-04 01:57:42 +00:00
Alex Van Brunt
8d0b2dbf21 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
Change-Id: Id4945d9f387330518f78669809639952e9227ed9
2014-10-03 18:54:28 -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
Dmitriy Ivanov
bf956e863e resolved conflicts for merge of 04f5f410 to lmp-mr1-dev-plus-aosp
Change-Id: I921c62dbe265b1be4d373d1988951de0f6743fba
2014-10-03 12:21:57 -07:00
Dmitriy Ivanov
dcca3fce3f am d5df4124: Merge "Add RTLD_NODELETE flag support"
* commit 'd5df4124bbbb30411ef19f7c2fbb3987d0eb9630':
  Add RTLD_NODELETE flag support
2014-10-03 16:47:05 +00: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
Dmitriy Ivanov
d5df4124bb Merge "Add RTLD_NODELETE flag support" 2014-10-02 21:47:29 +00:00
Dmitriy Ivanov
bbf86e6157 Fixes to linker code after the conflict resolution
Change-Id: Icd0728604a865b73e7af0e0aee38971a612935f2
2014-10-02 13:44:20 -07:00
Dmitriy Ivanov
2cd77d301f Undo the bad work of Automerger
Change-Id: I585388aebc556a094db4c22e647edacea7cde129
2014-10-02 13:08:39 -07:00
Dmitriy Ivanov
145372b1bc Revert "L-MR1 specific fixes"
This reverts commit 1cd0c6777f35b531c9ce78397d0915aa521b3e87.
2014-10-02 12:49:42 -07:00
Dmitriy Ivanov
d4ab8f0135 am 1cd0c677: L-MR1 specific fixes
* commit '1cd0c6777f35b531c9ce78397d0915aa521b3e87':
  L-MR1 specific fixes
2014-10-02 19:41:50 +00:00
Dmitriy Ivanov
feaf85e34c resolved conflicts for merge of 7d971ec1 to lmp-mr1-dev-plus-aosp
Change-Id: I1cd01e5c0dd00cd55594654d53f7e0cb6edf35d9
2014-10-02 12:38:54 -07:00
Dmitriy Ivanov
b5626827c9 resolved conflicts for merge of f4cb6313 to lmp-mr1-dev-plus-aosp
Change-Id: I9c033fa82c7bf07e06157227f5162d603804b7d6
2014-10-02 12:33:10 -07:00
Dmitriy Ivanov
85fc61d7d2 am ef1306d7: Refactoring: C++11 style DISABLE_ bionic marcos
* commit 'ef1306d77718cc74a8df5673a15649dea317571d':
  Refactoring: C++11 style DISABLE_ bionic marcos
2014-10-02 19:23:57 +00:00
Dmitriy Ivanov
2fbf6593ae resolved conflicts for merge of 61c4147f to lmp-mr1-dev-plus-aosp
Change-Id: I4ed15dbb2136a1984f7651dcc85d05e3e585ac51
2014-10-02 12:22:07 -07:00
Dmitriy Ivanov
6aac3cd112 resolved conflicts for merge of ae69a958 to lmp-mr1-dev-plus-aosp
Change-Id: Ia466577ef6e627cc6fcef46aa37cce21acbc8519
2014-10-02 12:17:32 -07:00
Dmitriy Ivanov
e3105fee22 resolved conflicts for merge of c0133a73 to lmp-mr1-dev-plus-aosp
Change-Id: I31d81e91d796fa27f9c88a7edc96c97320ade72c
2014-10-02 11:59:28 -07:00
Dmitriy Ivanov
daf15a6ca7 resolved conflicts for merge of 8de1ddec to lmp-mr1-dev-plus-aosp
Change-Id: I9bb063dcf684307181ce4a2b1e5f96bd0d78aaff
2014-10-02 11:34:05 -07:00
Dmitriy Ivanov
32ebc71f99 resolved conflicts for merge of 59c12a65 to lmp-mr1-dev-plus-aosp
Change-Id: I92667dd3d55c8cfd2586c88362fd542c7a6ff9b2
2014-10-02 11:27:57 -07:00
Dmitriy Ivanov
dadc782cf0 resolved conflicts for merge of 81fe2b16 to lmp-mr1-dev-plus-aosp
Change-Id: I61272d86ebf0d40262e88f5f4327cf97be035bda
2014-10-02 11:06:05 -07:00
Dmitriy Ivanov
9b6b6e6d4a resolved conflicts for merge of 7210c41f to lmp-mr1-dev-plus-aosp
Change-Id: I44d84a95f506e89e77cce8c218083a80ca5724b9
2014-10-02 10:54:08 -07:00
Dmitriy Ivanov
1c69516677 am 4466bd72: Implement LinkedList::visit()
* commit '4466bd72fb9daeb0ef8f250e8314b555aab30817':
  Implement LinkedList::visit()
2014-10-02 17:34:40 +00:00
Dmitriy Ivanov
de1943eb82 resolved conflicts for merge of ff01f6fc to lmp-mr1-dev-plus-aosp
Change-Id: I90e7700708a305a7e93dd3ef3a32c5508038b53b
2014-10-02 10:33:04 -07:00
Dmitriy Ivanov
846be3ea5d resolved conflicts for merge of 4d01d08c to lmp-mr1-dev-plus-aosp
Change-Id: Icaf503240281596de05ee331457200b61d57ab46
2014-10-02 10:28:43 -07:00
Dmitriy Ivanov
cd7890ba2d resolved conflicts for merge of cfad7ae9 to lmp-mr1-dev-plus-aosp
Change-Id: I119e37c6689c4cc49663748a72c17dc55a362b02
2014-10-02 10:21:34 -07:00
Dmitriy Ivanov
47102e1e1d am 5dfe802d: Remove unnecessary calls to LinkedList::clear()
* commit '5dfe802d0dedbfce355a7ece5bc77c7346941bb2':
  Remove unnecessary calls to LinkedList::clear()
2014-10-02 17:06:50 +00:00
Dmitriy Ivanov
abf6390f37 resolved conflicts for merge of 93c3f420 to lmp-mr1-dev-plus-aosp
Change-Id: I3cd9c572ec096dc14e0356fe2725074bc7af29d3
2014-10-02 10:05:02 -07:00
Dmitriy Ivanov
88eb2a9cf5 resolved conflicts for merge of 3bbd218e to lmp-mr1-dev-plus-aosp
Change-Id: Ie7f85be196a44ab59554384274f2022239f91b0e
2014-10-02 09:59:26 -07:00
Dmitriy Ivanov
5848154714 Merge "resolved conflicts for merge of bd321c11 to lmp-mr1-dev-plus-aosp" into lmp-mr1-dev-plus-aosp 2014-10-02 16:51:08 +00:00
Dmitriy Ivanov
0a21fe5dcd resolved conflicts for merge of bd321c11 to lmp-mr1-dev-plus-aosp
Change-Id: I6ee8a75840073ed00eda9f8f0fbd372cdcfb0be0
2014-10-02 09:49:28 -07:00
Dmitriy Ivanov
8fd546313c resolved conflicts for merge of 31b88da8 to lmp-mr1-dev-plus-aosp
Change-Id: I3081cba9e1372adc085380cda01d4825543a6727
2014-10-02 08:53:42 -07:00
Elliott Hughes
d081e8b539 am e4f8962a: Merge "Update bionic to tzdata 2014h." into lmp-mr1-dev
* commit 'e4f8962ab5b4fb64842f4635fdf01a860bb180ee':
  Update bionic to tzdata 2014h.
2014-10-02 12:37:01 +00:00
Elliott Hughes
26ce6c215b am b5f5b0e4: Fix update-tzdata.py to rebuild icu4c .dat file.
* commit 'b5f5b0e418e5c382573e367dd4aff9373180bbe4':
  Fix update-tzdata.py to rebuild icu4c .dat file.
2014-10-02 12:37:00 +00: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