ld.config.txt revision 7f654c3243ddf4859ce17e36ce7fe389a3c9a337
1# Copyright (C) 2017 The Android Open Source Project 2# 3# Bionic loader config file. 4# 5 6# Don't change the order here. 7dir.system = /system/bin/ 8dir.system = /system/xbin/ 9dir.vendor = /vendor/bin/ 10dir.test = /data/nativetest/ 11dir.test = /data/nativetest64/ 12dir.test = /data/benchmarktest/ 13dir.test = /data/benchmarktest64/ 14 15[system] 16additional.namespaces = sphal,vndk,rs 17 18############################################################################### 19# "default" namespace 20# 21# Framework-side code runs in this namespace. Anything from /vendor partition 22# can't be loaded in this namespace. 23############################################################################### 24namespace.default.isolated = false 25namespace.default.search.paths = /system/${LIB}:/vendor/${LIB} 26namespace.default.permitted.paths = /system/${LIB}:/vendor/${LIB} 27 28namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB} 29namespace.default.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB} 30 31# TODO(b/37013858): remove all dependencies to /vendor/lib from system processes 32# When this is done, comment out following three lines and remove the three 33# lines above 34#namespace.default.isolated = true 35#namespace.default.search.paths = /system/${LIB} 36#namespace.default.permitted.paths = /system/${LIB} 37# 38#namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB} 39#namespace.default.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB} 40 41############################################################################### 42# "sphal" namespace 43# 44# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be 45# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, 46# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. 47# 48# This namespace is exclusivly for SP-HALs. When the framework tries to dynami- 49# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying 50# that they should be searched and loaded from this namespace. 51# 52# Note that there is no link from the default namespace to this namespace. 53############################################################################### 54namespace.sphal.isolated = true 55namespace.sphal.visible = true 56namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB} 57namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp/hw 58 59namespace.sphal.asan.search.paths = /data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl:/data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}:/vendor/${LIB} 60namespace.sphal.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB} 61 62# Once in this namespace, access to libraries in /system/lib is restricted. Only 63# libs listed here can be used. 64namespace.sphal.links = default,vndk,rs 65 66# WARNING: only NDK libs can be listed here. 67namespace.sphal.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libvndksupport.so:libz.so 68 69# WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line. 70namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:android.hidl.memory@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libion.so:libutils.so:libc++.so 71 72# Renderscript gets separate namespace 73namespace.sphal.link.rs.shared_libs = libRS_internal.so 74 75############################################################################### 76# "rs" namespace 77# 78# This namespace is exclusively for Renderscript internal libraries. 79# This namespace has slightly looser restriction than the vndk namespace because 80# of the genuine characteristics of Renderscript; /data is in the permitted path 81# to load the compiled *.so file and libmediandk.so can be used here. 82############################################################################### 83namespace.rs.isolated = true 84namespace.rs.visible = true 85namespace.rs.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/vendor/${LIB} 86namespace.rs.permitted.paths = /vendor/${LIB}:/data 87 88namespace.rs.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/vendor/${LIB}:/vendor/${LIB} 89namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data 90 91namespace.rs.links = default,vndk 92namespace.rs.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libmediandk.so:libvndksupport.so:libz.so:libft2.so 93namespace.rs.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:android.hidl.memory@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libion.so:libutils.so:libc++.so 94 95############################################################################### 96# "vndk" namespace 97# 98# This namespace is exclusively for vndk-sp libs. 99############################################################################### 100namespace.vndk.isolated = true 101namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp 102namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl 103 104namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp 105namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl 106 107# When these NDK libs are required inside this namespace, then it is redirected 108# to the default namespace. This is possible since their ABI is stable across 109# Android releases. 110namespace.vndk.links = default 111namespace.vndk.link.default.shared_libs = android.hidl.memory@1.0-impl.so:libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libvndksupport.so:libz.so 112 113############################################################################### 114# Namespace config for vendor processes. In O, no restriction is enforced for 115# them. However, in O-MR1, access to /system/${LIB} will not be allowed to 116# the default namespace. 'system' namespace will be added to give limited 117# (LL-NDK only) access. 118############################################################################### 119[vendor] 120namespace.default.isolated = false 121namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/system/${LIB}/vndk:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/system/${LIB} 122 123namespace.default.asan.search.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl:/data/asan/vendor/${LIB}:/vendor/${LIB}:/data/asan/system/${LIB}/vndk:/system/${LIB}/vndk:/data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/system/${LIB}:/system/${LIB} 124 125############################################################################### 126# Namespace config for tests. No VNDK restriction is enforced for these tests. 127############################################################################### 128[test] 129namespace.default.isolated = false 130namespace.default.search.paths = /vendor/${LIB}:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/system/${LIB} 131 132namespace.default.asan.search.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/system/${LIB}:/system/${LIB} 133