android_bionic/linker
Jiyong Park efc503d677 Greylist libraries are attempted to be loaded in the default ns
Some of the greylist libraries can be in directories other than
/system/lib. For example, libnativehelper.so is moved from the directory
to /apex/com.android.runtime/lib.

Previous behavior for greylist libraries is to find the lib under
/system/lib while "within" the current namespace which is usually the
classloader-namespace. Since the libs no longer exist there, linker
fails to load it and no further attempt is made.

This change fixes the problem by loading the greylist libs "from" the
default namespace. Since there is a link from the default namespace to
the namespace where the moved libraries are intended to be loaded (e.g.,
the 'runtime' namespace for libnativehelper.so), the call is successful.

Bug: 124201397
Test: bionic-unit-tests

Change-Id: I11d15993d18896bdf663c408f9e40d8a607c9b80
2019-02-12 23:07:08 +09:00
..
arch Implement arm64 TLSDESC 2019-01-29 08:33:09 +00:00
tests Move the linker allocator into libc 2019-01-25 15:31:35 -08:00
Android.bp Move the dynamic linker to ./bootstrap subdir 2019-01-31 13:44:20 +09:00
Android.mk
MODULE_LICENSE_BSD
dlfcn.cpp Move dlerror out of a TLS slot and into a pthread_internal_t member. 2018-12-06 05:19:57 +00:00
ld.config.format.md
ld_android.cpp Expose libc_shared_globals to libc.so with symbol 2018-11-28 14:26:14 -08:00
linked_list.h Clean up bionic_macros.h a bit. 2018-10-25 11:00:00 -07:00
linker.arm.map Expose libc_shared_globals to libc.so with symbol 2018-11-28 14:26:14 -08:00
linker.cpp Greylist libraries are attempted to be loaded in the default ns 2019-02-12 23:07:08 +09:00
linker.generic.map Expose libc_shared_globals to libc.so with symbol 2018-11-28 14:26:14 -08:00
linker.h Purge linker block allocators before leaving linker 2019-01-30 22:13:13 -08:00
linker_block_allocator.cpp Purge linker block allocators before leaving linker 2019-01-30 22:13:13 -08:00
linker_block_allocator.h Purge linker block allocators before leaving linker 2019-01-30 22:13:13 -08:00
linker_cfi.cpp Add PR_SET_VMA and PR_SET_VMA_ANON_NAME to <sys/prctl.h>. 2018-08-22 10:36:23 -07:00
linker_cfi.h Switch the rest of our internal headers to #pragma once. 2018-02-13 14:27:17 -08:00
linker_common_types.h Clean up bionic_macros.h a bit. 2018-10-25 11:00:00 -07:00
linker_config.cpp Call realpath(3) only when the path is accessible for read 2019-01-25 20:48:12 +09:00
linker_config.h Move API levels from `uint32_t` to `int`. 2018-11-13 21:25:07 -08:00
linker_debug.h Switch the rest of our internal headers to #pragma once. 2018-02-13 14:27:17 -08:00
linker_dlwarning.cpp
linker_dlwarning.h Switch the rest of our internal headers to #pragma once. 2018-02-13 14:27:17 -08:00
linker_exidx_static.c
linker_gdb_support.cpp
linker_gdb_support.h Switch the rest of our internal headers to #pragma once. 2018-02-13 14:27:17 -08:00
linker_globals.cpp Be clearer about linker warnings. 2018-02-28 12:37:28 -08:00
linker_globals.h Be clearer about linker warnings. 2018-02-28 12:37:28 -08:00
linker_libc_support.c
linker_libcxx_support.cpp Adapt to the new libc++/libc++abi update. 2018-01-08 14:44:42 -08:00
linker_logger.cpp linker: only generate log messages when logging is enabled 2019-01-17 14:24:14 -08:00
linker_logger.h linker: only generate log messages when logging is enabled 2019-01-17 14:24:14 -08:00
linker_main.cpp Fix linker self-exec detection 2019-02-07 21:48:42 -08:00
linker_main.h Allow invoking the linker on an executable. 2018-10-10 14:31:06 -07:00
linker_mapped_file_fragment.cpp
linker_mapped_file_fragment.h Clean up bionic_macros.h a bit. 2018-10-25 11:00:00 -07:00
linker_memory.cpp Move the linker allocator into libc 2019-01-25 15:31:35 -08:00
linker_mips.cpp MIPS: Fix MIPS linker VDSO issues 2017-10-13 12:08:30 +02:00
linker_namespaces.cpp Be clearer about linker warnings. 2018-02-28 12:37:28 -08:00
linker_namespaces.h Libraries without dt_soname are inaccessible 2018-04-29 13:39:46 +02:00
linker_phdr.cpp Merge "linker: changes to init work arounds" 2018-11-29 16:50:37 +00:00
linker_phdr.h Allow invoking the linker on an executable. 2018-10-10 14:31:06 -07:00
linker_reloc_iterators.h Switch the rest of our internal headers to #pragma once. 2018-02-13 14:27:17 -08:00
linker_relocs.h Add generic TLS linker reloc macros 2019-01-02 14:36:26 -08:00
linker_sdk_versions.cpp Move API levels from `uint32_t` to `int`. 2018-11-13 21:25:07 -08:00
linker_sleb128.h Switch the rest of our internal headers to #pragma once. 2018-02-13 14:27:17 -08:00
linker_soinfo.cpp support LIB in runpath 2019-01-24 17:00:37 +09:00
linker_soinfo.h Implement arm64 TLSDESC 2019-01-29 08:33:09 +00:00
linker_tls.cpp Implement dynamic TLS accesses and allocation 2019-01-25 17:53:01 -08:00
linker_tls.h Implement arm64 TLSDESC 2019-01-29 08:33:09 +00:00
linker_utils.cpp Merge "linker: changes to init work arounds" 2018-11-29 16:50:37 +00:00
linker_utils.h linker: changes to init work arounds 2018-11-08 21:50:19 +00:00
linker_wrapper.cpp Rework the linker_wrapper to work with lld 2018-10-22 22:52:25 +00:00
rt.cpp