Commit Graph

14468 Commits

Author SHA1 Message Date
Dmitriy Ivanov
de0fb393ae Restore protection flags for ifunc during relocs.
IFUNC relocations require executable flag for the load
segment containing .text. When dso has text relocs linker
removes exec which causes crash during ifunc relocations.

This patch fixes this problem by restoring segments protection
for ifunc relocs.

Bug: http://b/22611399
Change-Id: Icbf3be0fec0e42bf805bcad7533e2032a2e11b9c
2015-07-26 07:37:09 -07:00
Yabin Cui
b8320b8021 Don't abort when failed to write tracing message.
Also make the code thread-safe with lock.

Bug: 20666100
Change-Id: I0f331a617b75280f36179c187418450230d713ef
(cherry picked from commit 1661125315)
2015-07-23 12:24:42 -07:00
Dan Albert
7e52dbe4d2 Merge "Revert "Stop libc from cross-referencing unwind symbols"" into mnc-dev 2015-07-21 23:09:35 +00:00
Ying Wang
e39b279bb4 Merge "We don't have CXX_BARE any more" into mnc-dev 2015-07-21 20:51:28 +00:00
Christopher Ferris
aa55e7ad24 Add support for non-zero vaddr in maps.
If a map has a non-zero vaddr then it needs to be added to the
computed relative offset.

Bug: 22532054

(cherry picked from commit 70b6e1daff)

Change-Id: I1e98741d6ff3b5bbb7fc5f88cc85b27ace75ee2e
2015-07-21 10:32:28 -07:00
Ying Wang
9d11a7087c We don't have CXX_BARE any more
Now we have split CXX_WRAPPER from TARGET_CXX and CXX_BARE isn't needed
any more.

Bug: 22612634
Change-Id: I52c78b0d1b325910e875a786d17f780731778b4b
2015-07-20 18:51:30 -07:00
Dan Albert
d7ce90090f Revert "Stop libc from cross-referencing unwind symbols"
This reverts commit cd13b14e98.

Bug: http://b/19958712
Change-Id: I7cc7f69728c42c37e129aee30d761c4cd7e30e94
(cherry picked from commit 95fd031c4d)
2015-07-20 17:25:26 -07:00
Christopher Ferris
43d35c356e Merge "Do not hold hash table lock while backtracing." into mnc-dev 2015-07-13 20:15:30 +00:00
Christopher Ferris
9fee99b060 Do not hold hash table lock while backtracing.
There is a deadlock if holding the hash table lock while trying to do
a backtrace. Change the code so that the hash table lock is only held
while actually modifying either g_hash_table, or while modifying an
entry from g_hash_table.

Bug: 22423683
Change-Id: I604ea56f940f22e99da41ea4dcdf97bedaac268d
2015-07-13 12:17:50 -07:00
Neil Fuller
64c8254416 Merge "Update timezone data to 2015e" into mnc-dev 2015-07-10 09:47:55 +00:00
Dmitriy Ivanov
a5bb841df7 Fix memory-leak on soinfo_free()
Bug: http://b/22290728
Change-Id: I00747056db2cd3ff8b33936278464daed7236536
(cherry picked from commit 609f11b31e)
2015-07-09 17:03:37 -07:00
Elliott Hughes
65dd858239 Fix alignment after variable-length data.
In the serialized output from netd, the strings come first. Some code
assumes -- reasonably enough -- that it can do unaligned reads of pointers,
so we need to ensure alignment after all the strings.

Bug: http://b/21192318
Change-Id: I456639127db9a2583f7f738e6b8103375d9387fd
2015-07-06 14:37:46 -07:00
Dmitriy Ivanov
f643eb38c3 Improve personality initialization
1. Personality parameter should be unsigned int (not long)
2. Do not reset bits outside of PER_MASK when setting
   personality value.
3. Set personality for static executables.

Bug: http://b/21900686
Change-Id: I4c7e34079cbd59b818ce221eed325c05b9bb2303
2015-06-30 18:45:59 -07:00
Neil Fuller
ae02a0ae00 Update timezone data to 2015e
Changes affecting future time stamps

    Morocco will suspend DST from 2015-06-14 03:00 through 2015-07-19 02:00,
    not 06-13 and 07-18 as we had guessed.  (Thanks to Milamber.)

    Assume Cayman Islands will observe DST starting next year, using US rules.
    Although it isn't guaranteed, it is the most likely.

Bug: 21836574
Change-Id: I30ab9ba8524c79e389ed0ff8c4af4378b7048265
2015-06-30 16:21:34 +01:00
Erik Kline
754f669076 Pass around struct android_net_context for better behaviour
Group network context elements in to a single struct and
add a version of android_getaddrinfofornet() that accepts it.

The introduction of UID-based routing means that the UID is an
integral part of the network context when evaluating connectivity,
sorting addresses, etc.

Also, introduce a distinction between DNS netids/marks and those
expected to be used by the application.  This can be important
when the network an application is using is not the same as the
network on which DNS queries will be issued.

Additionally, de-duplicate the UDP connect logic (collapse both
_test_connect() and _find_src_addr() into just the latter).

Bug: 19470192
Bug: 20733156
Bug: 21832279
Change-Id: If16c2f4744695f507993afdac078ca105eb5d3e4
(cherry picked from commit 01e37c9665)
2015-06-30 12:12:08 +09:00
Dmitriy Ivanov
f7d5bf334d Lock on dl_interate_phdr
There is possibility of someone dlclosing a library
while dl_iterate_phdr in progress which can lead to
dl_iterate_phdr calling callback with invalid address
if it was unmapped by dlclose.

Bug: http://b/22047255
Change-Id: I3fc0d9fd2c51fb36fd34cb035f37271fa893a7be
2015-06-29 14:48:25 -07:00
Dmitriy Ivanov
06700b2b5e Fix crash when trying to load invalid ELF file.
Bug: http://b/22047255
Bug: http://b/22091640
Change-Id: I6c51cff43287a6ac4b25fa9ce6a6fc3d232fd047
2015-06-25 17:03:26 -07:00
Dimitry Ivanov
fb3357e2eb Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
This reverts commit 40d9e7bf84.

Bug: http://b/22045439
Change-Id: Ia9c56f65d35e404332a462f46460335cef39f0a4
2015-06-24 20:42:33 +00:00
Duane Sand
40d9e7bf84 [MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
Enables running of older MIPS NDK-built apps on mips64r6.

Works with kernel supporting FRE emulation, and old kernels.

Bug: http://b/21555893
Change-Id: I13923fe62cd83ad1d337f13a50f2eda2dfdd906f
(cherry picked from commit d02ec08427)
2015-06-23 10:33:37 -07:00
Elliott Hughes
2b028f5ce4 Fix bad merge of 64e9e71cdb.
Bug: http://b/22029751
Change-Id: I6245fe5f274c9af8a632da5eebe50cf9fe29dc4a
2015-06-23 09:14:16 -07:00
Dmitriy Ivanov
d6d6c0c4f1 Merge "Remove libdl* tests from bionic-unit-tests-static" into mnc-dev 2015-06-22 19:25:37 +00:00
Dmitriy Ivanov
5fa858c565 Merge "Remove text-relocs support for apps targeting M+" into mnc-dev 2015-06-22 19:25:15 +00:00
Dmitriy Ivanov
96ebdcdca0 Remove libdl* tests from bionic-unit-tests-static
Bug: http://b/21900592
Change-Id: I907cc15684b121ec2fbdeca49fc584bb6d2eaacc
(cherry picked from commit de4e27e231)
2015-06-22 12:24:36 -07:00
Yabin Cui
cb06075903 am 8beb0c34: am b245bc75: am 0f455612: Merge "Fix flaky test of timer_create_multiple in L." into lollipop-mr1-cts-dev
* commit '8beb0c34da46a5146a2de8256db8bb42febb283c':
  Fix flaky test of timer_create_multiple in L.
2015-06-19 19:06:22 +00:00
Yabin Cui
8beb0c34da am b245bc75: am 0f455612: Merge "Fix flaky test of timer_create_multiple in L." into lollipop-mr1-cts-dev
* commit 'b245bc750021ce6d220e71625fca66620cdd1f05':
  Fix flaky test of timer_create_multiple in L.
2015-06-19 18:55:51 +00:00
Yabin Cui
b245bc7500 am 0f455612: Merge "Fix flaky test of timer_create_multiple in L." into lollipop-mr1-cts-dev
* commit '0f455612d3325932a851418634a17a61307948c5':
  Fix flaky test of timer_create_multiple in L.
2015-06-19 18:40:59 +00:00
David Srbecky
c08c88b5fc Merge "Add flag that makes linker honor min(p_vaddr)" into mnc-dev 2015-06-19 18:26:21 +00:00
Yabin Cui
0f455612d3 Merge "Fix flaky test of timer_create_multiple in L." into lollipop-mr1-cts-dev 2015-06-19 18:00:53 +00:00
Yabin Cui
410c1adf5f Fix flaky test of timer_create_multiple in L.
Bug: 20677618
Change-Id: I0cb5faf77edce042b10611543180f3e2e73d3d05
2015-06-18 16:19:02 -07:00
Dmitriy Ivanov
34e8e47d32 Add flag that makes linker honor min(p_vaddr)
(cherry picked from commit 8a11628355)

Bug: 21924613
Bug: http://b/21523078
Change-Id: I3f944a08dd2ed1df4d8a807da4fee423fdd35eb7
2015-06-18 23:58:34 +01:00
Christopher Ferris
7d6410e957 Merge "[MIPS] Add optimized string functions" into mnc-dev 2015-06-18 00:18:40 +00:00
Nikola Veljkovic
1d824c3912 [MIPS] Add optimized string functions
Use same string functions for all MIPS architectures.

Bug: 21555893
(cherry picked from commit 38f2eaa07b)

Change-Id: I94521f023d0bb136a4672782148a9f6e77cc6f1e
2015-06-17 17:02:11 -07:00
Dmitriy Ivanov
28154f5c56 Improve library lookup logic
Linker tries to open a library even if it can
be found by soname. This only happens if the
library was previously opened under different
target sdk version.

Bug: http://b/21876587
Bug: http://b/21153477
Bug: http://b/21171302
Bug: https://code.google.com/p/android/issues/detail?id=160921
Change-Id: I7dbbcc3b49933bffd89ca0af55371e1a1f2bf4c2
2015-06-17 16:36:03 -07:00
Dmitriy Ivanov
4d0d31475f Add versions to libm.so symbols
Bug: http://b/20139821
Change-Id: Ifdfcac62d59eb8f0985990aa8512046ecb87449e
(cherry picked from commit 636f5ddddc)
2015-06-17 13:50:37 -07:00
Dimitry Ivanov
6b37515c38 Merge "Revert "Improve library lookup logic"" into mnc-dev 2015-06-17 20:43:23 +00:00
Dimitry Ivanov
1eba2f4ce1 Revert "Improve library lookup logic"
This reverts commit ea4ef52fa4.

Bug: http://b/21876587
Bug: http://b/21153477
Bug: http://b/21171302
Bug: https://code.google.com/p/android/issues/detail?id=160921
Change-Id: I23ddbd69294023c56c9cbabad29d26c8f736ab43
2015-06-17 20:42:20 +00:00
Dmitriy Ivanov
462df82902 Merge "Improve library lookup logic" into mnc-dev 2015-06-17 17:15:06 +00:00
Elliott Hughes
d49850d6ab Fixes for building gdbserver (and gdb) out of the box.
Bug: http://b/21695943
Change-Id: Iadb600b2ae619515d7038a4db9bf464ba31adb36
(cherry picked from commit 895241efbb)
2015-06-16 16:59:49 -07:00
Dmitriy Ivanov
ea4ef52fa4 Improve library lookup logic
Linker tries to open a library even if it can
be found by soname. This only happens if the
library was previously opened under different
target sdk version.

Bug: http://b/21876587
Bug: http://b/21153477
Bug: http://b/21171302
Bug: https://code.google.com/p/android/issues/detail?id=160921
Change-Id: I769a04b6b1368a107d43f399297be14050338bbc
2015-06-16 16:52:21 -07:00
Tim Murray
848276051a Merge "Add support for cortex-a53 in bionic." into mnc-dev 2015-06-16 20:47:17 +00:00
Tim Murray
c34df8b280 Add support for cortex-a53 in bionic.
allows -mcpu=cortex-a53 to be passed as part of a command line.

Change-Id: Id4203a9fd197f4c3b661bad21ac58c32819fd687
2015-06-16 13:43:19 -07:00
Dmitriy Ivanov
420574690c Add version to libc.so symbols
Bug: http://b/21617095
Bug: http://b/20139821
Change-Id: If3d42d2a0b4a0c49721fd9b9ecbb4f7bee5a1eff
(cherry picked from commit 665607a6b7)
2015-06-16 11:08:01 -07:00
Elliott Hughes
929be68849 Hide accidentally-exposed __clock_nanosleep.
Bug: http://b/21858067
Change-Id: Iaa83a5e17cfff796aed4f641d0d14427614d9399
(cherry picked from commit b1304935b6)
2015-06-16 10:44:24 -07:00
Elliott Hughes
f1c85411a8 Avoid name collision with user_fpsimd_state in <asm/ptrace.h>.
We don't want to use <asm/ptrace.h> because (a) it'll drag in a bunch of
namespace pollution and (b) the registers should be "long double" for
userspace, not the kernel's uint128s. So just use a slightly different
name for our struct (which matches the traditional names for these structs
anyway).

Bug: http://b/21695943
Bug: https://code.google.com/p/android/issues/detail?id=86712
Change-Id: I8812ca98cfe6b649dbd31f7d6aea41928ba2acbd
(cherry picked from commit 0577733c2e)
2015-06-15 19:02:40 -07:00
Dan Albert
cce405a134 Add a sys/procfs.h.
Needed for building gdbserver out of the box.

Bug: http://b/21695943
Bug: https://code.google.com/p/android/issues/detail?id=86712
Change-Id: Ieadda2b595f08bfddfa61fcd68006b8e7c1a438d
(cherry picked from commit bf18c61798)
2015-06-15 18:39:02 -07:00
Elliott Hughes
7051c0f2a5 Fix two accidentally leaked mips64 symbols.
Bug: http://b/21857154
Change-Id: Ie1fb63f54c6c527b8c1172e8f6ce48f23fca9b41
(cherry picked from commit 469b418784)
2015-06-15 18:36:48 -07:00
Sharvil Nanavati
fdcaeac1a9 am 00cef820: am 64e9e71c: Define nonportable pthread mutex macros with the _NP suffix.
* commit '00cef82013c0826bb43c11651d25de8b99335618':
  Define nonportable pthread mutex macros with the _NP suffix.
2015-06-15 15:48:00 +00:00
Dmitriy Ivanov
3e6f780754 Remove text-relocs support for apps targeting M+
Remove support of text-relocations for apps targeting sdk version > 22

Bug: http://b/20013628
Change-Id: I2127739544480c747315e32df15dfbd1b79de4f5
2015-06-12 15:09:54 -07:00
Sharvil Nanavati
00cef82013 am 64e9e71c: Define nonportable pthread mutex macros with the _NP suffix.
* commit '64e9e71cdb7d88397e510e1986d494b797ed3b45':
  Define nonportable pthread mutex macros with the _NP suffix.
2015-06-12 20:13:46 +00:00
Sharvil Nanavati
64e9e71cdb Define nonportable pthread mutex macros with the _NP suffix.
Change-Id: I1066352e5b2607f64daf6aeb0030d0bbe88ead8d
2015-06-12 10:56:17 -07:00