summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2019-04-25 23:19:57 -0700
committerStephen Hines <srhines@google.com>2019-06-06 02:12:30 -0700
commit3bdd3cfab66b7b2553d00309797786b65489b852 (patch)
treea976bd718fcc263433d8df218695e0070d980e73 /rootdir
parent1803972b6b081e522454de5ee72d58011f5c8e9f (diff)
downloadsystem_core-3bdd3cfab66b7b2553d00309797786b65489b852.tar.gz
system_core-3bdd3cfab66b7b2553d00309797786b65489b852.tar.bz2
system_core-3bdd3cfab66b7b2553d00309797786b65489b852.zip
Link the "runtime" namespace to more namespaces.
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved to the runtime APEX. It is apparently the first LL-NDK library in the runtime APEX that does not require a legacy symlink in /system/${LIB}. Therefore we need to link the HWASAN runtime in the runtime namespace to various namespaces so that the library can be loaded from outside of the namespace. Also, add $SANITIZER_RUNTIME_LIBRARIES to namespace.default.link.system.shared_libs. This is necessary because in the accompanying Soong change, we cause the HWASAN runtime to be removed from $LLNDK_LIBRARIES. In most cases, except for this one, this was a no-op because we were already including both sets of libraries in shared_libs. Bug: http://b/134503977 Test: Builds Change-Id: I67d64788855d28f3a156a1b9cf8a897617277730 Merged-In: I67d64788855d28f3a156a1b9cf8a897617277730 (cherry picked from commit fb1c5a724e7f6cd07b64b0b4dcfdff5677ab7b9f)
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/etc/ld.config.txt21
1 files changed, 16 insertions, 5 deletions
diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.txt
index 2ac54e9fb..9b7add137 100644
--- a/rootdir/etc/ld.config.txt
+++ b/rootdir/etc/ld.config.txt
@@ -143,6 +143,7 @@ namespace.default.link.runtime.shared_libs += libandroidicu.so
# TODO(b/122876336): Remove libpac.so once it's migrated to Webview
namespace.default.link.runtime.shared_libs += libpac.so
+namespace.default.link.runtime.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
# 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
@@ -362,7 +363,7 @@ namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER
# The "vndk" namespace links to "default" namespace for LLNDK libs and links to
# "sphal" namespace for vendor libs. The ordering matters. The "default"
# namespace has higher priority than the "sphal" namespace.
-namespace.vndk.links = default,sphal
+namespace.vndk.links = default,sphal,runtime
# When these NDK libs are required inside this namespace, then it is redirected
# to the default namespace. This is possible since their ABI is stable across
@@ -370,6 +371,8 @@ namespace.vndk.links = default,sphal
namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%
namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
+namespace.vndk.link.runtime.shared_libs = %SANITIZER_RUNTIME_LIBRARIES%
+
# Allow VNDK-SP extensions to use vendor libraries
namespace.vndk.link.sphal.allow_all_shared_libs = true
@@ -422,8 +425,10 @@ namespace.default.asan.permitted.paths += /odm
namespace.default.asan.permitted.paths += /data/asan/vendor
namespace.default.asan.permitted.paths += /vendor
-namespace.default.links = system,vndk%VNDK_IN_SYSTEM_NS%
-namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%
+namespace.default.links = system,vndk%VNDK_IN_SYSTEM_NS%,runtime
+namespace.default.link.runtime.shared_libs = %SANITIZER_RUNTIME_LIBRARIES%
+namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%
+namespace.default.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
namespace.default.link.vndk_in_system.shared_libs = %VNDK_USING_CORE_VARIANT_LIBRARIES%
namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES%
@@ -476,13 +481,15 @@ namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER%
# Android releases. The links here should be identical to that of the
# 'vndk_in_system' namespace, except for the link between 'vndk' and
# 'vndk_in_system'.
-namespace.vndk.links = system,default%VNDK_IN_SYSTEM_NS%
+namespace.vndk.links = system,default%VNDK_IN_SYSTEM_NS%,runtime
namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES%
namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
namespace.vndk.link.default.allow_all_shared_libs = true
+namespace.vndk.link.runtime.shared_libs = %SANITIZER_RUNTIME_LIBRARIES%
+
namespace.vndk.link.vndk_in_system.shared_libs = %VNDK_USING_CORE_VARIANT_LIBRARIES%
###############################################################################
@@ -514,6 +521,7 @@ namespace.system.link.runtime.shared_libs += libnativehelper.so
namespace.system.link.runtime.shared_libs += libnativeloader.so
# Workaround for b/124772622
namespace.system.link.runtime.shared_libs += libandroidicu.so
+namespace.system.link.runtime.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
###############################################################################
# "vndk_in_system" namespace
@@ -552,7 +560,8 @@ namespace.vndk_in_system.whitelisted = %VNDK_USING_CORE_VARIANT_LIBRARIES%
# 1. 'vndk_in_system' needs to be freely linked back to 'vndk'.
# 2. 'vndk_in_system' does not need to link to 'default', as any library that
# requires anything vendor would not be a vndk_in_system library.
-namespace.vndk_in_system.links = vndk,system
+namespace.vndk_in_system.links = vndk,system,runtime
+namespace.vndk_in_system.link.runtime.shared_libs = %SANITIZER_RUNTIME_LIBRARIES%
namespace.vndk_in_system.link.system.shared_libs = %LLNDK_LIBRARIES%
namespace.vndk_in_system.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
@@ -683,3 +692,5 @@ namespace.default.isolated = false
namespace.default.search.paths = /system/${LIB}
namespace.default.search.paths += /%PRODUCT%/${LIB}
namespace.default.search.paths += /%PRODUCT_SERVICES%/${LIB}
+
+namespace.default.link.runtime.shared_libs = %SANITIZER_RUNTIME_LIBRARIES%