Clean up some linker config inconsistencies.
- Some paths that were intended to be added to the platform namespace
were actually added to the default one instead. Remove them - the
relevant paths are already in the art namespace.
- Add asan counterparts to all paths. For the /system permitted.paths
this is already the case in the linkerconfig generated config:
https://r.android.com/1172072
Test: build & boot
Change-Id: I6b176b196f038be88f012735a067f506033817ee
diff --git a/build/apex/ld.config.txt b/build/apex/ld.config.txt
index 4121e9f..2fb496b 100644
--- a/build/apex/ld.config.txt
+++ b/build/apex/ld.config.txt
@@ -39,15 +39,19 @@
# TODO(b/129534335): Move this to the linker configuration of the Test
# ART APEX when it is available.
namespace.art.permitted.paths = /data
+namespace.art.asan.permitted.paths = /data
# odex files are in /system/framework and /apex/com.android.art/javalib.
# dalvikvm has to be able to dlopen the files for CTS.
namespace.art.permitted.paths += /system/framework
namespace.art.permitted.paths += /apex/com.android.art/javalib
+namespace.art.asan.permitted.paths += /system/framework
+namespace.art.asan.permitted.paths += /apex/com.android.art/javalib
# TODO(b/144533348): to allow symlinks pointing the libs under /system/lib
# Note that this however does not open all libs in the system partition to
# the APEX namespaces, because searching of the libs are NOT done in
# /system/lib, but in /apex/<module>/lib directory.
namespace.art.permitted.paths += /system/${LIB}
+namespace.art.asan.permitted.paths += /system/${LIB}
namespace.art.links = platform,neuralnetworks,adbd
# Need allow_all_shared_libs because libart.so can dlopen oat files in
# /system/framework and /data.
@@ -71,13 +75,6 @@
namespace.platform.search.paths = /system/${LIB}
namespace.platform.asan.search.paths = /data/asan/system/${LIB}
-# This is only a subset of platform default namespace permitted paths, and might
-# need extension.
-namespace.default.permitted.paths = /data
-namespace.default.permitted.paths += /system/framework
-namespace.default.asan.permitted.paths = /data
-namespace.default.asan.permitted.paths += /system/framework
-
namespace.platform.links = art
namespace.platform.link.art.shared_libs = libandroidicu.so
namespace.platform.link.art.shared_libs += libdexfile_external.so
@@ -125,6 +122,7 @@
# the APEX namespaces, because searching of the libs are NOT done in
# /system/lib, but in /apex/<module>/lib directory.
namespace.conscrypt.permitted.paths = /system/${LIB}
+namespace.conscrypt.asan.permitted.paths = /system/${LIB}
namespace.conscrypt.links = art,platform
namespace.conscrypt.link.art.shared_libs = libandroidio.so
namespace.conscrypt.link.platform.shared_libs = libc.so
@@ -147,6 +145,7 @@
# the APEX namespaces, because searching of the libs are NOT done in
# /system/lib, but in /apex/<module>/lib directory.
namespace.neuralnetworks.permitted.paths = /system/${LIB}
+namespace.neuralnetworks.asan.permitted.paths = /system/${LIB}
namespace.neuralnetworks.links = platform
namespace.neuralnetworks.link.platform.shared_libs = libc.so
namespace.neuralnetworks.link.platform.shared_libs += libcgrouprc.so