diff options
author | chenbruce <chenbruce@google.com> | 2019-01-29 11:52:41 +0800 |
---|---|---|
committer | chenbruce <chenbruce@google.com> | 2019-01-30 17:03:09 +0800 |
commit | d771740030da8c6b54890270a5102b3bf425d9ec (patch) | |
tree | 26608a0e29b654f9bb20c90c3a05f350a0cd7a76 /rootdir | |
parent | aa87fd5f7d12ce536782db5922e28b84122fdde2 (diff) | |
download | system_core-d771740030da8c6b54890270a5102b3bf425d9ec.tar.gz system_core-d771740030da8c6b54890270a5102b3bf425d9ec.tar.bz2 system_core-d771740030da8c6b54890270a5102b3bf425d9ec.zip |
Add more comments for resolv apex.
Describe the link of resolv apex detailedly.
Bug: 119527674
Test: make; flash; lsof -p $(pidof netd)
Change-Id: I0f6038eb9950c6b862a257d0a6f35f19cb83a328
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/etc/ld.config.legacy.txt | 9 | ||||
-rw-r--r-- | rootdir/etc/ld.config.txt | 9 | ||||
-rw-r--r-- | rootdir/etc/ld.config.vndk_lite.txt | 9 |
3 files changed, 27 insertions, 0 deletions
diff --git a/rootdir/etc/ld.config.legacy.txt b/rootdir/etc/ld.config.legacy.txt index 1321c241f..f998ae218 100644 --- a/rootdir/etc/ld.config.legacy.txt +++ b/rootdir/etc/ld.config.legacy.txt @@ -38,6 +38,12 @@ namespace.default.asan.search.paths += /odm/${LIB} additional.namespaces = runtime,conscrypt,media,resolv # Keep in sync with ld.config.txt in the com.android.runtime APEX. +# If a shared library or an executable requests a shared library that +# cannot be loaded into the default namespace, the dynamic linker tries +# to load the shared library from the runtime namespace.And then, if the +# shared library cannot be loaded from the runtime namespace either, the +# dynamic linker tries to load the shared library from the resolv namespace. +# Finally, if all attempts fail, the dynamic linker returns an error. namespace.default.links = runtime,resolv namespace.default.asan.links = runtime,resolv # Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by @@ -49,6 +55,9 @@ namespace.default.link.runtime.shared_libs += libnativebridge.so namespace.default.link.runtime.shared_libs += libnativehelper.so namespace.default.link.runtime.shared_libs += libnativeloader.so +# When libnetd_resolv.so can't be found in the default namespace, search for it +# in the resolv namespace. Don't allow any other libraries from the resolv namespace +# to be loaded in the default namespace. namespace.default.link.resolv.shared_libs = libnetd_resolv.so ############################################################################### diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.txt index f37f92266..269928661 100644 --- a/rootdir/etc/ld.config.txt +++ b/rootdir/etc/ld.config.txt @@ -106,6 +106,12 @@ namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/priv-app namespace.default.asan.permitted.paths += /mnt/expand # Keep in sync with ld.config.txt in the com.android.runtime APEX. +# If a shared library or an executable requests a shared library that +# cannot be loaded into the default namespace, the dynamic linker tries +# to load the shared library from the runtime namespace.And then, if the +# shared library cannot be loaded from the runtime namespace either, the +# dynamic linker tries to load the shared library from the resolv namespace. +# Finally, if all attempts fail, the dynamic linker returns an error. namespace.default.links = runtime,resolv # Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by # libart. @@ -116,6 +122,9 @@ namespace.default.link.runtime.shared_libs += libnativebridge.so namespace.default.link.runtime.shared_libs += libnativehelper.so namespace.default.link.runtime.shared_libs += libnativeloader.so +# When libnetd_resolv.so can't be found in the default namespace, search for it +# in the resolv namespace. Don't allow any other libraries from the resolv namespace +# to be loaded in the default namespace. namespace.default.link.resolv.shared_libs = libnetd_resolv.so ############################################################################### diff --git a/rootdir/etc/ld.config.vndk_lite.txt b/rootdir/etc/ld.config.vndk_lite.txt index a8ed04f24..bd889d1c8 100644 --- a/rootdir/etc/ld.config.vndk_lite.txt +++ b/rootdir/etc/ld.config.vndk_lite.txt @@ -57,6 +57,12 @@ namespace.default.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} # Keep in sync with the platform namespace in the com.android.runtime APEX # ld.config.txt. +# If a shared library or an executable requests a shared library that +# cannot be loaded into the default namespace, the dynamic linker tries +# to load the shared library from the runtime namespace.And then, if the +# shared library cannot be loaded from the runtime namespace either, the +# dynamic linker tries to load the shared library from the resolv namespace. +# Finally, if all attempts fail, the dynamic linker returns an error. namespace.default.links = runtime,resolv # Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by # libart. @@ -66,6 +72,9 @@ 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 +# When libnetd_resolv.so can't be found in the default namespace, search for it +# in the resolv namespace. Don't allow any other libraries from the resolv namespace +# to be loaded in the default namespace. namespace.default.link.resolv.shared_libs = libnetd_resolv.so ############################################################################### |