1# Copyright (C) 2018 The Android Open Source Project 2# 3# Bionic loader config file for the ART APEX. 4# 5# There are no versioned APEX paths here - this APEX module does not support 6# having several versions mounted. 7 8dir.art = /apex/com.android.art/bin/ 9 10[art] 11additional.namespaces = system,conscrypt,art,neuralnetworks,adbd 12 13# The default namespace here only links to other namespaces, in particular "art" 14# where the real library loading takes place. Any outgoing links from "art" also 15# need to be present here. 16namespace.default.isolated = true 17namespace.default.links = art,system,adbd 18namespace.default.link.art.allow_all_shared_libs = true 19namespace.default.link.system.allow_all_shared_libs = true 20namespace.default.link.adbd.shared_libs = libadbconnection_client.so 21 22############################################################################### 23# "art" APEX namespace 24# 25# This is the local namespace of this APEX, with the proper name "art" to make 26# links created e.g. through android_link_namespace work consistently with the 27# system linker config. 28############################################################################### 29namespace.art.isolated = true 30# Visible to allow links to be created at runtime, e.g. through 31# android_link_namespaces in libnativeloader. 32namespace.art.visible = true 33 34# Keep in sync with the "art" namespace in system/core/rootdir/etc/ld.config*.txt. 35namespace.art.search.paths = /apex/com.android.art/${LIB} 36namespace.art.asan.search.paths = /apex/com.android.art/${LIB} 37# JVMTI libraries used in ART testing are located under /data; dalvikvm 38# has to be able to dlopen them. 39# TODO(b/129534335): Move this to the linker configuration of the Test 40# ART APEX when it is available. 41namespace.art.permitted.paths = /data 42namespace.art.asan.permitted.paths = /data 43# odex files are in /system/framework and /apex/com.android.art/javalib. 44# dalvikvm has to be able to dlopen the files for CTS. 45namespace.art.permitted.paths += /system/framework 46namespace.art.permitted.paths += /apex/com.android.art/javalib 47namespace.art.asan.permitted.paths += /system/framework 48namespace.art.asan.permitted.paths += /apex/com.android.art/javalib 49# TODO(b/144533348): to allow symlinks pointing the libs under /system/lib 50# Note that this however does not open all libs in the system partition to 51# the APEX namespaces, because searching of the libs are NOT done in 52# /system/lib, but in /apex/<module>/lib directory. 53namespace.art.permitted.paths += /system/${LIB} 54namespace.art.asan.permitted.paths += /system/${LIB} 55namespace.art.links = system,neuralnetworks,adbd 56# Need allow_all_shared_libs because libart.so can dlopen oat files in 57# /system/framework and /data. 58# TODO(b/130340935): Use a dynamically created linker namespace similar to 59# classloader-namespace for oat files, and tighten this up. 60namespace.art.link.system.allow_all_shared_libs = true 61namespace.art.link.neuralnetworks.shared_libs = libneuralnetworks.so 62namespace.art.link.adbd.shared_libs = libadbconnection_client.so 63 64############################################################################### 65# "system" namespace 66# 67# Corresponds to the default namespace in /system/etc/ld.config.txt. Please keep 68# in sync with linker config files in system/core/rootdir/etc. 69############################################################################### 70namespace.system.isolated = true 71# Visible to allow links to be created at runtime, e.g. through 72# android_link_namespaces in libnativeloader. 73namespace.system.visible = true 74 75namespace.system.search.paths = /system/${LIB} 76namespace.system.asan.search.paths = /data/asan/system/${LIB} 77 78namespace.system.links = art,adbd 79namespace.system.link.art.shared_libs = libandroidicu.so 80namespace.system.link.art.shared_libs += libdexfile_external.so 81namespace.system.link.art.shared_libs += libdexfiled_external.so 82# TODO(b/120786417 or b/134659294): libicuuc.so and libicui18n.so are kept for app compat. 83namespace.system.link.art.shared_libs += libicui18n.so 84namespace.system.link.art.shared_libs += libicuuc.so 85namespace.system.link.art.shared_libs += libnativebridge.so 86namespace.system.link.art.shared_libs += libnativehelper.so 87namespace.system.link.art.shared_libs += libnativeloader.so 88 89# TODO(b/122876336): Remove libpac.so once it's migrated to Webview 90namespace.system.link.art.shared_libs += libpac.so 91 92namespace.system.link.adbd.shared_libs = libadb_pairing_auth.so 93namespace.system.link.adbd.shared_libs += libadb_pairing_connection.so 94namespace.system.link.adbd.shared_libs += libadb_pairing_server.so 95 96# /system/lib/libc.so, etc are symlinks to 97# /apex/com.android.runtime/lib/bionic/libc.so, etc. Add the path to the 98# permitted paths because linker uses realpath(3) to check the accessibility 99# of the lib. We could add this to search.paths instead but that makes the 100# resolution of bionic libs be dependent on the order of /system/lib and 101# /apex/.../lib/bionic in search.paths. If the latter is after the former, 102# then the latter is never tried because libc.so is always found in 103# /system/lib but fails to pass the accessibility test because of its realpath. 104# It's better to not depend on the ordering if possible. 105namespace.system.permitted.paths = /apex/com.android.runtime/${LIB}/bionic 106namespace.system.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic 107 108# Note that we don't need to link the art namespace with conscrypt: 109# the runtime Java code and binaries do not explicitly load native libraries 110# from it. 111 112############################################################################### 113# "conscrypt" APEX namespace 114# 115# This namespace is for libraries within the conscrypt APEX. 116############################################################################### 117 118# Keep in sync with the "conscrypt" namespace in system/core/rootdir/etc/ld.config*.txt. 119namespace.conscrypt.isolated = true 120namespace.conscrypt.visible = true 121 122namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB} 123namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB} 124# TODO(b/144533348): to allow symlinks pointing the libs under /system/lib 125# Note that this however does not open all libs in the system partition to 126# the APEX namespaces, because searching of the libs are NOT done in 127# /system/lib, but in /apex/<module>/lib directory. 128namespace.conscrypt.permitted.paths = /system/${LIB} 129namespace.conscrypt.asan.permitted.paths = /system/${LIB} 130namespace.conscrypt.links = art,system 131namespace.conscrypt.link.art.shared_libs = libandroidio.so 132namespace.conscrypt.link.system.shared_libs = libc.so 133namespace.conscrypt.link.system.shared_libs += libm.so 134namespace.conscrypt.link.system.shared_libs += libdl.so 135namespace.conscrypt.link.system.shared_libs += liblog.so 136 137############################################################################### 138# "neuralnetworks" APEX namespace 139# 140# This namespace is for libraries within the NNAPI APEX. 141############################################################################### 142namespace.neuralnetworks.isolated = true 143namespace.neuralnetworks.visible = true 144 145namespace.neuralnetworks.search.paths = /apex/com.android.neuralnetworks/${LIB} 146namespace.neuralnetworks.asan.search.paths = /apex/com.android.neuralnetworks/${LIB} 147# TODO(b/144533348): to allow symlinks pointing the libs under /system/lib 148# Note that this however does not open all libs in the system partition to 149# the APEX namespaces, because searching of the libs are NOT done in 150# /system/lib, but in /apex/<module>/lib directory. 151namespace.neuralnetworks.permitted.paths = /system/${LIB} 152namespace.neuralnetworks.asan.permitted.paths = /system/${LIB} 153namespace.neuralnetworks.links = system 154namespace.neuralnetworks.link.system.shared_libs = libc.so 155namespace.neuralnetworks.link.system.shared_libs += libcgrouprc.so 156namespace.neuralnetworks.link.system.shared_libs += libdl.so 157namespace.neuralnetworks.link.system.shared_libs += liblog.so 158namespace.neuralnetworks.link.system.shared_libs += libm.so 159namespace.neuralnetworks.link.system.shared_libs += libnativewindow.so 160namespace.neuralnetworks.link.system.shared_libs += libneuralnetworks_packageinfo.so 161namespace.neuralnetworks.link.system.shared_libs += libsync.so 162namespace.neuralnetworks.link.system.shared_libs += libvndksupport.so 163 164############################################################################### 165# "adbd" APEX namespace 166# 167# This namespace is for libraries within the adbd APEX. 168############################################################################### 169 170namespace.adbd.isolated = true 171namespace.adbd.visible = true 172 173namespace.adbd.search.paths = /apex/com.android.adbd/${LIB} 174namespace.adbd.asan.search.paths = /apex/com.android.adbd/${LIB} 175namespace.adbd.links = system 176namespace.adbd.link.system.shared_libs = libc.so 177namespace.adbd.link.system.shared_libs += libm.so 178namespace.adbd.link.system.shared_libs += libdl.so 179namespace.adbd.link.system.shared_libs += liblog.so 180