49cfc899a3708fae9175e44c0c02cd479fda8b36 |
|
13-May-2016 |
Dimitry Ivanov <dimitry@google.com> |
linker: Allow caller to specify parent namespace This change enables apps to share libraries opened with RTLD_GLOBAL between different classloader namespaces. The new parameter to create_namespace allows native_loader to instruct the linker to share libraries belonging to global group from a specified namespace instead of using the caller_ns. Bug: http://b/28560538 Bug: https://code.google.com/p/android/issues/detail?id=208458 Change-Id: I5d0c62730bbed19cdeb16c7559c74aa262a2475f (cherry picked from commit fc2da53440383fe1026e0eb287d643b577c2707d)
|
dcaef3710df817db5652a1f3ab4646f43f5cd3ee |
|
17-May-2016 |
Dimitry Ivanov <dimitry@google.com> |
Fix dlopen of main executable by absolute path This CL adds initialization of inode for the main executable which enables linker to resolve the correct soinfo when application calls dlopen with absolute path to the main executable. Bug: http://b/28420266 Change-Id: I102e07bde454bd44c6e46075e3faeeb5092830d8 (cherry picked from commit 2ba1cf39ae6087249a839ec7b3793d4d4fa75438)
|
19b669b00325bcbab4679c4e57c5d8d95f54decb |
|
10-May-2016 |
Dimitry Ivanov <dimitry@google.com> |
Remove linker-namespace functions from the header They are intended for platform use only and we shouldn't have them in the public header file. Bug: http://b/28174921 Change-Id: Ib9b3d0fa9442cfa2e784a693ad567d1444d774e5 (cherry picked from commit 41fd29532b52bb66e3e1f4620053713fd0299f6e)
|
0551c1d47bad202ce6dd90757067bc0fd217497a |
|
11-Apr-2016 |
Dimitry Ivanov <dimitry@google.com> |
Remove dangling links in secondary namespaces linker didn't remove link to the soinfo from shared namespaces on soinfo_unload, because it didn't keep record of all namespaces the library is added to. This change adds test for this and also fixes the problem by introducing list of secondary namespaces to soinfo, which is used to remove soinfo in soinfo::remove_all_links(). Bug: http://b/28115950 Change-Id: Ifbf6e54f92fa6e88f86b6a8dd6dc22d4553afd22 (cherry picked from commit aca299ac4721809d6fc61e25c505bb59acd23fbc)
|
ae74e8750b9dae51b24a22fdb4b0e0a2d84f37b9 |
|
24-Mar-2016 |
Dimitry Ivanov <dimitry@google.com> |
linker: hide the pointer to soinfo Handle no longer is a pointer to soinfo of a corresponding library. This is done to prevent access to linker internal fields. Bug: http://b/25593965 Change-Id: I62bff0d0e5b2dc842e6bf0babb30fcc4c000be24 (cherry picked from commit d88e1f350111b3dfd71c6492321f0503cb5540db)
|
350bdad61cc6551db649fcaeb8642f4a1d6b139a |
|
01-Mar-2016 |
Dimitry Ivanov <dimitry@google.com> |
linker: print "not accessible" error message to the log Print properties of the namespace on "library is not accessible" error to better diagnose problems with native library accessiblity Bug: http://b/27406143 Change-Id: Icf3d6c604f09dfa015de863fdb1267d343930d2a
|
33697a0c43c48e15c3bcf018138b9b837d0099cd |
|
26-Jan-2016 |
Elliott Hughes <enh@google.com> |
Factor out the waiting for children in bionic tests. Change-Id: I4a1e51b6920b33dc892d447f5bd6d10f1cb2704a
|
f45b0e9edee72e97106c4b3d393b9bf1582303b3 |
|
15-Jan-2016 |
Dimitry Ivanov <dimitry@google.com> |
Do not unmap reserved region on dlclose dlclose used to unmap the part of the reserved region for ANDROID_DLEXT_RESERVED_ADDRESS that was neccessary to map PT_LOAD segments. With this change dlclose replaces mapped PT_LOAD segments with a PROT_NONE, MAP_ANONYMOUS | MAP_NORESERVE. Previously caller was unmapping the reserved region after the failed dlclose which led to race condition when someone else reused the region freed by dlclose but before the unmap by the chromium code. Bug: http://code.google.com/p/chromium/issues/detail?id=568880 Change-Id: I0f5eaa2bf6641f83dde469b631c518482acc59a2
|
c0ffceccf93e1752a555086a04d1484c1df1b165 |
|
20-Jan-2016 |
Christopher Ferris <cferris@google.com> |
Remove dependency on zipalign. Roll our own version of zipalign so that we can break the dependency on the build tools zipalign. This breaks the transitive dependency on androidfw so that building bionic unit tests in brillo works again. Also modify the DlExtTest.ExtInfoUseFdWithOffset test so it dynamically gets the offset of the shared library inside of the zip instead of hard-coding the value. Bug: 25446938 Change-Id: Idfb5d3089960a94eefa2c76e03da1ad2f4d7fb2f
|
7331fe18d7ffd550996e07b534bc7a6cf625afa5 |
|
14-Dec-2015 |
Dimitry Ivanov <dimitry@google.com> |
linker: implement shared namespaces Shared namespaces clone the list of loaded native libraries from the caller namespace. This allows classloaders for bundled apps to share already loaded libraries with default namespace. Bug: http://b/22548808 Bug: http://b/26165097 Change-Id: I8949d45937fdb38e1f586ff0679003adac0d9dad (cherry picked from commit e78deef364d952dd1141a2f3067a12060aaf11e6)
|
e78deef364d952dd1141a2f3067a12060aaf11e6 |
|
14-Dec-2015 |
Dimitry Ivanov <dimitry@google.com> |
linker: implement shared namespaces Shared namespaces clone the list of loaded native libraries from the caller namespace. This allows classloaders for bundled apps to share already loaded libraries with default namespace. Bug: http://b/22548808 Bug: http://b/26165097 Change-Id: I8949d45937fdb38e1f586ff0679003adac0d9dad
|
284ae3559ed909613b189b98bdc3efab94373a30 |
|
08-Dec-2015 |
Dimitry Ivanov <dimitry@google.com> |
Add permitted_when_isolated_path to linker namespaces The permitted_when_isolated_path is a way to white-list directories not present in search-path. It is ignored for not isolated namespaces. Bug: http://b/25853516 Bug: http://b/22548808 Change-Id: Ib1538037268eea69323ea49968a34a4a1d1938a5
|
22840aab47763c88598b32d1edcac4d8b3ef21f0 |
|
05-Dec-2015 |
Dimitry Ivanov <dimitry@google.com> |
Allow dlopening public libs using absolute path dlopen on isolated namespaces should be able to open public libraries using absolute path not only soname. Bug: http://b/25853820 Change-Id: If574a67853dc51226f0f376e9e2d108316002f84
|
1ffec1cc4d0e283bb1ff6f49843769a3493b8d73 |
|
23-Nov-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Introduce anonymous namespace The anonymous namespace is introduced to handle cases when linker can not find the caller. This usually happens when caller code was not loaded by dynamic linker; for example mono-generated code. Bug: http://b/25844435 Bug: http://b/22548808 Change-Id: I9e5b1d23c1c75bc78548d68e79216a6a943a33cf
|
3cc35e224c6fe6bb82685ff8b2758553563e2a05 |
|
18-Nov-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Ignore target sdk version for the public namespace This fixes the bug with using the libraries loaded prior to android_set_target_sdk_version call. Bug: http://b/22548808 Change-Id: I3ca2d367b0fa930a437bbb65f780834803d2ef0a
|
42d5fcb9f494eb45de3b6bf759f4a18076e84728 |
|
30-Oct-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Introducing linker namespaces Bug: http://b/22548808 Change-Id: Ia3af3c0a167f1d16447a3d83bb045d143319b1e1
|
fd7a91e69263a991f65fa458ff33de0670b4fd81 |
|
06-Nov-2015 |
Dmitriy Ivanov <dimitry@google.com> |
linker: cleanup solist after unsuccessful read Bug: http://b/25560017 Change-Id: I03c5a1d7aed34c480d341aacfb3b1afdfa037b99
|
126af757c6d6a6447c19236df8d98ba07f21996f |
|
08-Oct-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Implement load at fixed address feature Bug: http://b/24683631 Change-Id: I3a39ab526c8f9e213339b60e135e5459d0f41381
|
a1feb117e4d5614548574f28dede3443e073512b |
|
02-Oct-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Make dt_runpath work for libraries opened from apk This patch also fixes realpath for libraries opened directly from apks. Bug: http://b/21960914 Bug: http://b/21961857 Change-Id: I35ade661c87f1d448191f385811f6e9fd3cacf11
|
b48275045de93cce292faaf5170af3ead89b3746 |
|
29-Sep-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Optimize dlopen from a zip file This change makes dynamic linker reuse ZipArchiveHandles in ld_library_path on dlopen to optimize the lookup of dt_needed libraries. Bug: http://b/21960534 Change-Id: I65f897910d46dd2ffabdcb0b7842db2f127eee30
|
edfc9f63a261994f2565492436607c04df980e21 |
|
03-Sep-2015 |
Dmitriy Ivanov <dimitry@google.com> |
linker: don't pass dlextinfo to dependent loads Don't pass the parent load's dlextinfo to dependent loads, since this causes the linker to try to load the dependencies using the same addresses/relro/fds/etc as the main library, which is never going to work. This was how it worked before ae69a95 which broke this. Bug: http://b/23742664 Bug: http://b/20948231 Bug: http://b/20841817 Change-Id: I340ebae1127666d5c6c6f9c6521b89fb93f15bdd
|
402a75060dcd194c1991a15df2aba51f0d868ac3 |
|
09-Jun-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Make path to apk compliant with jar url format Bug: http://b/21726698 Bug: http://b/8076853 Change-Id: I8c1942a98fe3119746b4dc9f60a7ff215ea7009c (cherry picked from commit 524f1f1efe0cb32714c61e26f21701ac952b9e42)
|
524f1f1efe0cb32714c61e26f21701ac952b9e42 |
|
09-Jun-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Make path to apk compliant with jar url format Bug: http://b/21726698 Bug: http://b/8076853 Change-Id: I8c1942a98fe3119746b4dc9f60a7ff215ea7009c
|
ef25592f14d23ce6294ea103e9edf894779d141d |
|
08-Apr-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Fix dl* tests to run-on-host Bug: http://b/20121152 Change-Id: I1e1f41d885c75dbb26f91565a53a15d62ef72ce6
|
aae859cc3ca127d890e853cbf12b731e05624a22 |
|
31-Mar-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Add realpath for soinfo This change adds realpath to soinfo and extends limit on filenames from 128 to PATH_MAX. It also removes soinfo::name field, linker uses dt_soname instead. Bug: http://b/19818481 Bug: https://code.google.com/p/android/issues/detail?id=80336 Change-Id: I9cff4cb5bda3ee2bc74e1bbded9594ea7fbe2a08
|
9b82136b987bc01224e3b42732334ea27c97d188 |
|
03-Apr-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Add ANDROID_DLEXT_FORCE_LOAD flag This flag allows to force loading of the library in the case when for some reason multiple ELF files share the same filename (because the already-loaded library has been removed and overwritten, for example). Change-Id: I798d44409ee13d63eaa75d685e99c4d028d2b0c1
|
52393a56335435efc605aff66aca3145873e1e56 |
|
19-Mar-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Move open from zip tests to dlext To avoid building them for glibc. Also replace snprintf with std::string Change-Id: I12e1d2e4ab46ff5af6c05453da67842e0d838fc5
|
b1ada3dd3fbf188ced9ab1edf1ee154d119bbc02 |
|
16-Mar-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Fix typo Change-Id: Ie6dad7d09873c88f6bbb2d45c2780e3b0c618bd6
|
294d1e2c9e17873a0ce1c23cb2a559fc04f610be |
|
08-Dec-2014 |
Yabin Cui <yabinc@google.com> |
better gtest runner for bionic 1. option to run each test in a separate forked process: "--isolate". 2. warnings about slow tests: "--warnline". 3. run multiple tests at the same time: "-j N". Bug: 17589740 Change-Id: Ife5f4cafec43aa051ad7bd9c9b2b7e2e437db0de
|
16f7f8d2503a9033a09a4d7e857561d63471bb82 |
|
04-Nov-2014 |
Yabin Cui <yabinc@google.com> |
check invalid file offset when loading library Bug: 18178121 Bug: 18078224 Change-Id: I5254433d54645db68e9b83d5095dc2bf9d8531bc
|
702ab5b37e77684ee352300d32b078606ee388d0 |
|
21-Oct-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Rename library_offset to library_fd_offset replace lseek() and use pread() instead add test for library_fd_offset > file_size case Bug: 17762003 (cherry picked from commit a6c1279098f24a675d0df74ce1946f5d534b425e) Change-Id: Ie117c745081ee33d07db5341115ff6c8e98b0dec
|
3c5c720b0b46ecd801329c09d23bb6e7098d76d3 |
|
09-Oct-2014 |
Ying Wang <wangying@google.com> |
Build dlext_testzip as custom module. Use $(BUILD_SYSTEM)/base_rules to build it as custom module, so that it's exposed to utilities like mm/mmma etc. Bug: 17887283 Bug: 17762003 (cherry picked from commit 667853d47770fbdb54aaf0b3261b0d4882725770) Change-Id: I405797d16f20dc09e5d84b93b6727b634db2fc2c
|
de01780f46e4e4540c7a1ea7d0302f460c880e9d |
|
04-Oct-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Add file_offset parameter to android_extinfo Bug: 17762003 (cherry picked from commit 07e5bc152d8a3ad4c50808bb86f3c0f2c5e2f514) Change-Id: I72d527831384ff5dde013a4c8dfe639fbec165f5
|
a6c1279098f24a675d0df74ce1946f5d534b425e |
|
21-Oct-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Rename library_offset to library_fd_offset replace lseek() and use pread() instead add test for library_fd_offset > file_size case Bug: 17762003 Change-Id: I4555f0be635124efe849c1f226985bcba72ffcbd
|
667853d47770fbdb54aaf0b3261b0d4882725770 |
|
09-Oct-2014 |
Ying Wang <wangying@google.com> |
Build dlext_testzip as custom module. Use $(BUILD_SYSTEM)/base_rules to build it as custom module, so that it's exposed to utilities like mm/mmma etc. Bug: 17887283 Change-Id: Idd7b62d08e4d56331a3ff15da6aa46eae8c41898
|
07e5bc152d8a3ad4c50808bb86f3c0f2c5e2f514 |
|
04-Oct-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Add file_offset parameter to android_extinfo Bug: 17762003 Change-Id: I8fb267a3155acef3dba534038cf5d1ef00d7154b
|
69fb9f3f408b7d7f85522e3848a8ab5b87d6e377 |
|
03-Sep-2014 |
Dan Albert <danalbert@google.com> |
Don't fail a test just because we aren't root. If the tests are not being run as root, emit a message and don't continue with the test. Change-Id: I352e1a4162caaeb18b81b8daf44797009756dcd9
|
a2c6ae6f841d088b79a2a7bbd73847b8b199a521 |
|
27-Aug-2014 |
Chih-Hung Hsieh <chh@google.com> |
Add missing type casts before comparison. BUG: 17300548 Change-Id: Ice9868f36c8fa8cd40bb13741b0e33c8f8d354fd
|
04dc91ae763adc403a14c88b4c46f77b3d2d71a3 |
|
01-Jul-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Load library using file handle. * This patch enables dlopen by file descriptor instead of path/name. Bug: 15984217 Change-Id: Ib39051e00567fb97070bf96d8ce63993877c0a01
|
26052616915fe2324755687c7db73d69c521b34d |
|
02-May-2014 |
Torne (Richard Coles) <torne@google.com> |
Test that relro sharing actually saves memory. Spawn 20 child processes, have them all load the library, and compare the total PSS used in the case where we use dlopen() and the case where we use android_dlopen_ext() with relro sharing. We assume we will save at least 10% of the memory; in practise this example saves 40% or more so this should be a reasonable threshold. Bug: 14299541 Change-Id: Idccf6b8b0eb137abae2200f1ce68fb76b3cbdd75
|
26ec9679ff01fb155ae21015f31cc95bed24f670 |
|
30-Apr-2014 |
Torne (Richard Coles) <torne@google.com> |
Handle empty relro segment or incorrectly sized file. If the file has no relro segment, the generated relro file will have length 0, which caused mmap to fail. If the relro file has nonzero size, but is too short (e.g. because it's for the wrong version of the library), the linker would segfault while comparing the data. Fix both these issues: don't try to map a zero length file, and don't try to compare data that would be beyond the end of the file. Improve test to explicitly generate two versions of the library: one with -z relro, and one with -z norelro, so we can test both cases; also explicitly test the case where the relro file has length 0. Bug: 14299541 Change-Id: Id8b95585edda90e8bb5de452a35b70ed2d224934
|
53c884e28166678b2fa40cb3763d1549074628ad |
|
23-Apr-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Get ANDROID_DATA dir from enviroment Change-Id: Ie3675bd27bbc779fc2140f95b930eadd14838753
|
183ad9df536ab04ef35a397a1f4724e4e401d11f |
|
27-Feb-2014 |
Torne (Richard Coles) <torne@google.com> |
Allow sharing the RELRO section via a file. Add flags and a file descriptor to android_dlopen_ext() to allow writing the RELRO section of the loaded library to a file after relocation processing, and to allow mapping identical pages from the file over the top of relocated memory in another process. Explicitly comparing the pages is required in case a page contains a reference to a symbol defined in another library loaded at a random base address. Bug: 13005501 Change-Id: Ibb5b2d384edfaa5acf3e97a5f8b6115c10497a1e
|
12bbb9164578b6512b8b07a3fb093858244b7c7b |
|
06-Feb-2014 |
Torne (Richard Coles) <torne@google.com> |
Support loading libraries to a reserved address. Add flags and parameters to android_dlopen_ext() to allow loading a library at an already-reserved fixed address. If the library to be loaded will not fit within the space reserved, then the linker will either fail, or allocate its own address space as usual, according to which flag has been specified. This behaviour only applies to the specific library requested; any other libraries loaded as dependencies will be loaded in the normal fashion. There is a new gtest included to cover the functionality added. Bug: 13005501 Change-Id: I5d1810375b20fc51ba6a9b3191a25f9792c687f1
|