diff options
author | Martin Stjernholm <mast@google.com> | 2019-01-17 21:26:48 +0000 |
---|---|---|
committer | Martin Stjernholm <mast@google.com> | 2019-01-23 15:45:59 +0000 |
commit | c02464ced99fc8ac238d393baad96ab7637a06f8 (patch) | |
tree | 550410c80b310e238a4f9ebd2d60d47b8a47c960 /rootdir | |
parent | 1fc8a55ba7f223ecfac213fa9aeb2cc94d5d0de9 (diff) | |
download | system_core-c02464ced99fc8ac238d393baad96ab7637a06f8.tar.gz system_core-c02464ced99fc8ac238d393baad96ab7637a06f8.tar.bz2 system_core-c02464ced99fc8ac238d393baad96ab7637a06f8.zip |
Make libdexfile_external.so accessible from binaries and libraries in /system.
There are dependencies on libdexfile_external from some central libraries
that are widely used (b/123186083).
One example is vendor/bin/hw/android.hardware.media.omx@1.0-service, which
requries the link from "system" to "runtime" in the [vendor] section.
The direct dependants are libunwindstack and simpleperf, so it's enough to
link from namespaces containing /system/{lib,lib64,bin}.
Test: Flash and boot
Test: Flash and boot with Runtime APEX enabled (http://r.android.com/q/topic:art-move-libs-to-runtime-apex)
Bug: 123186083
Bug: 113373927
Change-Id: I081aa7392c875202acdaf1185c2ff28e17ac7e76
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/etc/ld.config.txt | 20 | ||||
-rw-r--r-- | rootdir/etc/ld.config.vndk_lite.txt | 20 |
2 files changed, 39 insertions, 1 deletions
diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.txt index b60be20f9..fed5e28c4 100644 --- a/rootdir/etc/ld.config.txt +++ b/rootdir/etc/ld.config.txt @@ -113,6 +113,7 @@ namespace.default.links = runtime # libart. namespace.default.visible = true namespace.default.link.runtime.shared_libs = libart.so:libartd.so +namespace.default.link.runtime.shared_libs += libdexfile_external.so namespace.default.link.runtime.shared_libs += libnativebridge.so namespace.default.link.runtime.shared_libs += libnativehelper.so namespace.default.link.runtime.shared_libs += libnativeloader.so @@ -313,7 +314,7 @@ namespace.vndk.link.sphal.allow_all_shared_libs = true # (LL-NDK only) access. ############################################################################### [vendor] -additional.namespaces = system,vndk +additional.namespaces = runtime,system,vndk ############################################################################### # "default" namespace @@ -350,6 +351,20 @@ namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES% ############################################################################### +# "runtime" APEX namespace +# +# This namespace exposes externally accessible libraries from the Runtime APEX. +############################################################################### +namespace.runtime.isolated = true + +# Keep in sync with ld.config.txt in the com.android.runtime APEX. +namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} +namespace.runtime.links = system +# TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library +# when it exists. +namespace.runtime.link.system.allow_all_shared_libs = true + +############################################################################### # "vndk" namespace # # This namespace is where VNDK and VNDK-SP libraries are loaded for @@ -406,6 +421,9 @@ namespace.system.asan.search.paths += /%PRODUCT%/${LIB} namespace.system.asan.search.paths += /data/asan/product_services/${LIB} namespace.system.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} +namespace.system.links = runtime +namespace.system.link.runtime.shared_libs = libdexfile_external.so + ############################################################################### # Namespace config for binaries under /postinstall. # Only default namespace is defined and default has no directories diff --git a/rootdir/etc/ld.config.vndk_lite.txt b/rootdir/etc/ld.config.vndk_lite.txt index 7a852c717..2dbb45ff9 100644 --- a/rootdir/etc/ld.config.vndk_lite.txt +++ b/rootdir/etc/ld.config.vndk_lite.txt @@ -62,6 +62,7 @@ namespace.default.links = runtime # libart. namespace.default.visible = true namespace.default.link.runtime.shared_libs = libart.so:libartd.so +namespace.default.link.runtime.shared_libs += libdexfile_external.so namespace.default.link.runtime.shared_libs += libnativehelper.so namespace.default.link.runtime.shared_libs += libnativeloader.so @@ -256,6 +257,8 @@ namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% # (LL-NDK only) access. ############################################################################### [vendor] +additional.namespaces = runtime + namespace.default.isolated = false namespace.default.search.paths = /odm/${LIB} @@ -295,6 +298,23 @@ namespace.default.asan.search.paths += /%PRODUCT%/${LIB} namespace.default.asan.search.paths += /data/asan/product_services/${LIB} namespace.default.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} +namespace.default.links = runtime +namespace.default.link.runtime.shared_libs = libdexfile_external.so + +############################################################################### +# "runtime" APEX namespace +# +# This namespace exposes externally accessible libraries from the Runtime APEX. +############################################################################### +namespace.runtime.isolated = true + +# Keep in sync with ld.config.txt in the com.android.runtime APEX. +namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} +namespace.runtime.links = default +# TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library +# when it exists. +namespace.runtime.link.default.allow_all_shared_libs = true + ############################################################################### # Namespace config for binaries under /postinstall. # Only default namespace is defined and default has no directories |