ld.config.txt revision 90a2487776d464e867c7bad1dc8d993ed50df09e
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}
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:libz.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libvndksupport.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.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/vendor/${LIB}
85namespace.rs.permitted.paths = /vendor/${LIB}:/data
86
87namespace.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}
88namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data
89
90namespace.rs.links = default,vndk
91namespace.rs.link.default.shared_libs = libc.so:libz.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libmediandk.so:libvndksupport.so
92namespace.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
93
94###############################################################################
95# "vndk" namespace
96#
97# This namespace is exclusively for vndk-sp libs.
98###############################################################################
99namespace.vndk.isolated = true
100namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp
101namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl
102
103namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp
104namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl
105
106# When these NDK libs are required inside this namespace, then it is redirected
107# to the default namespace. This is possible since their ABI is stable across
108# Android releases.
109namespace.vndk.links = default
110namespace.vndk.link.default.shared_libs = android.hidl.memory@1.0-impl.so:libc.so:libz.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libvndksupport.so
111
112###############################################################################
113# Namespace config for vendor processes. In O, no restriction is enforced for
114# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
115# the default namespace. 'system' namespace will be added to give limited
116# (LL-NDK only) access.
117###############################################################################
118[vendor]
119namespace.default.isolated = false
120namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/system/${LIB}/vndk:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/system/${LIB}
121
122namespace.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}
123
124###############################################################################
125# Namespace config for tests. No VNDK restriction is enforced for these tests.
126###############################################################################
127[test]
128namespace.default.isolated = false
129namespace.default.search.paths = /vendor/${LIB}:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/system/${LIB}
130
131namespace.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}
132