blob: c47b7f6f084488d2ba7ead835a7c84372f26f98c [file] [log] [blame]
Jiyong Park450cff42017-04-05 14:24:14 +09001# Copyright (C) 2017 The Android Open Source Project
2#
3# Bionic loader config file.
4# This gives the exactly the same namespace setup in pre-O.
5#
6
7# All binaries gets the same configuration 'legacy'
8dir.legacy = /system
changho.shin715b1aa2018-11-28 15:15:16 +09009dir.legacy = /product
Jiyong Park450cff42017-04-05 14:24:14 +090010dir.legacy = /vendor
Alin Jerpeleafa7958e2017-09-27 09:40:59 +020011dir.legacy = /odm
Jiyong Park450cff42017-04-05 14:24:14 +090012dir.legacy = /sbin
13
changho.shin715b1aa2018-11-28 15:15:16 +090014# Except for /postinstall, where only /system and /product are searched
Jiyong Parkd7e6cb22018-03-20 01:12:31 +090015dir.postinstall = /postinstall
16
Martin Stjernholmadf45032019-03-26 16:30:23 +000017# Fallback entry to provide APEX namespace lookups for binaries anywhere else.
18# This must be last.
19dir.legacy = /data
20
Jiyong Park450cff42017-04-05 14:24:14 +090021[legacy]
22namespace.default.isolated = false
Martin Stjernholmc57ed292019-04-25 16:20:32 +010023# Visible to allow links to be created at runtime, e.g. through
24# android_link_namespaces in libnativeloader.
25namespace.default.visible = true
Jiyong Park2498e1b2017-12-12 22:11:47 +090026
27namespace.default.search.paths = /system/${LIB}
changho.shin715b1aa2018-11-28 15:15:16 +090028namespace.default.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090029namespace.default.search.paths += /vendor/${LIB}
30namespace.default.search.paths += /odm/${LIB}
31
32namespace.default.asan.search.paths = /data/asan/system/${LIB}
33namespace.default.asan.search.paths += /system/${LIB}
changho.shin715b1aa2018-11-28 15:15:16 +090034namespace.default.asan.search.paths += /data/asan/product/${LIB}
35namespace.default.asan.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090036namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
37namespace.default.asan.search.paths += /vendor/${LIB}
changho.shin715b1aa2018-11-28 15:15:16 +090038namespace.default.asan.search.paths += /data/asan/odm/${LIB}
39namespace.default.asan.search.paths += /odm/${LIB}
Jiyong Parkd7e6cb22018-03-20 01:12:31 +090040
41###############################################################################
Nicolas Geoffrayad125602019-01-24 21:20:20 +000042# APEX related namespaces.
43###############################################################################
44
Przemyslaw Szczepaniak0bb871d2019-07-10 12:08:57 +010045additional.namespaces = runtime,conscrypt,media,neuralnetworks,resolv
Nicolas Geoffrayad125602019-01-24 21:20:20 +000046
Martin Stjernholmc57ed292019-04-25 16:20:32 +010047# Keep in sync with the "platform" namespace in art/build/apex/ld.config.txt.
chenbruced7717402019-01-29 11:52:41 +080048# If a shared library or an executable requests a shared library that
49# cannot be loaded into the default namespace, the dynamic linker tries
Roland Levillaine51c8762019-03-07 19:06:57 +000050# to load the shared library from the runtime namespace. And then, if the
chenbruced7717402019-01-29 11:52:41 +080051# shared library cannot be loaded from the runtime namespace either, the
52# dynamic linker tries to load the shared library from the resolv namespace.
53# Finally, if all attempts fail, the dynamic linker returns an error.
Przemyslaw Szczepaniak0bb871d2019-07-10 12:08:57 +010054namespace.default.links = runtime,resolv,neuralnetworks
55namespace.default.asan.links = runtime,resolv,neuralnetworks
Martin Stjernholm8a50dad2019-04-30 16:11:30 +010056namespace.default.link.runtime.shared_libs = libandroidicu.so
57namespace.default.link.runtime.shared_libs += libdexfile_external.so
58namespace.default.link.runtime.shared_libs += libdexfiled_external.so
Martin Stjernholm0d28abc2019-06-06 14:11:04 +010059# TODO(b/120786417 or b/134659294): libicuuc.so and libicui18n.so are kept for app compat.
Victor Chang0c7edec2019-05-13 16:14:03 +010060namespace.default.link.runtime.shared_libs += libicui18n.so
61namespace.default.link.runtime.shared_libs += libicuuc.so
Nicolas Geoffrayad125602019-01-24 21:20:20 +000062namespace.default.link.runtime.shared_libs += libnativebridge.so
63namespace.default.link.runtime.shared_libs += libnativehelper.so
64namespace.default.link.runtime.shared_libs += libnativeloader.so
Victor Chang785ba2e2019-01-15 18:04:56 +000065
66# TODO(b/122876336): Remove libpac.so once it's migrated to Webview
67namespace.default.link.runtime.shared_libs += libpac.so
Nicolas Geoffrayad125602019-01-24 21:20:20 +000068
chenbruced7717402019-01-29 11:52:41 +080069# When libnetd_resolv.so can't be found in the default namespace, search for it
70# in the resolv namespace. Don't allow any other libraries from the resolv namespace
71# to be loaded in the default namespace.
chenbruceaa87fd52019-01-24 13:01:21 +080072namespace.default.link.resolv.shared_libs = libnetd_resolv.so
73
Przemyslaw Szczepaniak0bb871d2019-07-10 12:08:57 +010074# LLNDK library moved into apex
75namespace.default.link.neuralnetworks.shared_libs = libneuralnetworks.so
76
Nicolas Geoffrayad125602019-01-24 21:20:20 +000077###############################################################################
78# "runtime" APEX namespace
79#
80# This namespace exposes externally accessible libraries from the Runtime APEX.
Martin Stjernholmc57ed292019-04-25 16:20:32 +010081# Keep in sync with the "runtime" namespace in art/build/apex/ld.config.txt.
Nicolas Geoffrayad125602019-01-24 21:20:20 +000082###############################################################################
Martin Stjernholm59b54f42019-09-17 20:06:54 +000083# TODO(b/139408016): Rename this namespace to "art".
Nicolas Geoffrayad125602019-01-24 21:20:20 +000084namespace.runtime.isolated = true
Martin Stjernholmc57ed292019-04-25 16:20:32 +010085# Visible to allow links to be created at runtime, e.g. through
86# android_link_namespaces in libnativeloader.
Nicolas Geoffraya9b4f2b2019-01-26 01:06:43 +000087namespace.runtime.visible = true
Nicolas Geoffrayad125602019-01-24 21:20:20 +000088
Martin Stjernholm59b54f42019-09-17 20:06:54 +000089namespace.runtime.search.paths = /apex/com.android.art/${LIB}
90namespace.runtime.asan.search.paths = /apex/com.android.art/${LIB}
Nicolas Geoffrayad125602019-01-24 21:20:20 +000091namespace.runtime.links = default
Martin Stjernholm609236f2019-02-27 21:40:42 +000092# Need allow_all_shared_libs because libart.so can dlopen oat files in
93# /system/framework and /data.
94# TODO(b/130340935): Use a dynamically created linker namespace similar to
95# classloader-namespace for oat files, and tighten this up.
Nicolas Geoffrayad125602019-01-24 21:20:20 +000096namespace.runtime.link.default.allow_all_shared_libs = true
97
98###############################################################################
99# "media" APEX namespace
100#
101# This namespace is for libraries within the media APEX.
102###############################################################################
103namespace.media.isolated = true
104namespace.media.visible = true
105
106namespace.media.search.paths = /apex/com.android.media/${LIB}
107namespace.media.asan.search.paths = /apex/com.android.media/${LIB}
108
Dongwon Kang3408eaa2019-02-22 00:47:13 -0800109namespace.media.permitted.paths = /apex/com.android.media/${LIB}/extractors
110
Nicolas Geoffrayad125602019-01-24 21:20:20 +0000111namespace.media.links = default
Dongwon Kang5744cc42019-04-23 14:56:21 -0700112namespace.media.link.default.shared_libs = libbinder_ndk.so
Dongwon Kanga013e3d2019-03-15 14:43:07 -0700113namespace.media.link.default.shared_libs += libc.so
Yifan Hong063b6be2019-03-29 13:17:35 -0700114namespace.media.link.default.shared_libs += libcgrouprc.so
Dongwon Kanga013e3d2019-03-15 14:43:07 -0700115namespace.media.link.default.shared_libs += libdl.so
116namespace.media.link.default.shared_libs += liblog.so
117namespace.media.link.default.shared_libs += libmediametrics.so
118namespace.media.link.default.shared_libs += libmediandk.so
119namespace.media.link.default.shared_libs += libm.so
120namespace.media.link.default.shared_libs += libvndksupport.so
121
122namespace.media.link.default.shared_libs += libclang_rt.asan-aarch64-android.so
123namespace.media.link.default.shared_libs += libclang_rt.asan-arm-android.so
124namespace.media.link.default.shared_libs += libclang_rt.asan-i686-android.so
125namespace.media.link.default.shared_libs += libclang_rt.asan-x86_64-android.so
126namespace.media.link.default.shared_libs += libclang_rt.hwasan-aarch64-android.so
Nicolas Geoffrayad125602019-01-24 21:20:20 +0000127
128###############################################################################
129# "conscrypt" APEX namespace
130#
131# This namespace is for libraries within the conscrypt APEX.
Martin Stjernholmc57ed292019-04-25 16:20:32 +0100132# Keep in sync with the "conscrypt" namespace in art/build/apex/ld.config.txt.
Nicolas Geoffrayad125602019-01-24 21:20:20 +0000133###############################################################################
134namespace.conscrypt.isolated = true
135namespace.conscrypt.visible = true
136
Nicolas Geoffrayad125602019-01-24 21:20:20 +0000137namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB}
138namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB}
Pete Bentley7b967bf2019-01-30 18:35:48 +0000139namespace.conscrypt.links = runtime,default
Pete Bentleycc6c50a2019-03-21 17:13:14 +0000140namespace.conscrypt.link.runtime.shared_libs = libandroidio.so
Nicolas Geoffrayad125602019-01-24 21:20:20 +0000141namespace.conscrypt.link.default.shared_libs = libc.so
142namespace.conscrypt.link.default.shared_libs += libm.so
143namespace.conscrypt.link.default.shared_libs += libdl.so
Tom Cherryfe1f7012019-02-08 11:55:36 -0800144namespace.conscrypt.link.default.shared_libs += liblog.so
Nicolas Geoffrayad125602019-01-24 21:20:20 +0000145
146###############################################################################
chenbruceaa87fd52019-01-24 13:01:21 +0800147# "resolv" APEX namespace
148#
149# This namespace is for libraries within the resolv APEX.
150###############################################################################
151namespace.resolv.isolated = true
152namespace.resolv.visible = true
153
154namespace.resolv.search.paths = /apex/com.android.resolv/${LIB}
155namespace.resolv.asan.search.paths = /apex/com.android.resolv/${LIB}
156namespace.resolv.links = default
157namespace.resolv.link.default.shared_libs = libc.so
Yifan Hong063b6be2019-03-29 13:17:35 -0700158namespace.resolv.link.default.shared_libs += libcgrouprc.so
chenbruceaa87fd52019-01-24 13:01:21 +0800159namespace.resolv.link.default.shared_libs += libm.so
160namespace.resolv.link.default.shared_libs += libdl.so
161namespace.resolv.link.default.shared_libs += libbinder_ndk.so
Tom Cherryfe1f7012019-02-08 11:55:36 -0800162namespace.resolv.link.default.shared_libs += liblog.so
Dongwon Kang9dff5152019-02-08 14:00:35 -0800163namespace.resolv.link.default.shared_libs += libvndksupport.so
chenbruceaa87fd52019-01-24 13:01:21 +0800164
165###############################################################################
Przemyslaw Szczepaniak0bb871d2019-07-10 12:08:57 +0100166# "neuralnetworks" APEX namespace
167#
168# This namespace is for libraries within the NNAPI APEX.
169###############################################################################
170namespace.neuralnetworks.isolated = true
171namespace.neuralnetworks.visible = true
172
173namespace.neuralnetworks.search.paths = /apex/com.android.neuralnetworks/${LIB}
174namespace.neuralnetworks.asan.search.paths = /apex/com.android.neuralnetworks/${LIB}
175namespace.neuralnetworks.links = default
176namespace.neuralnetworks.link.default.shared_libs = libc.so
177namespace.neuralnetworks.link.default.shared_libs += libcgrouprc.so
178namespace.neuralnetworks.link.default.shared_libs += libdl.so
179namespace.neuralnetworks.link.default.shared_libs += liblog.so
180namespace.neuralnetworks.link.default.shared_libs += libm.so
181namespace.neuralnetworks.link.default.shared_libs += libnativewindow.so
182namespace.neuralnetworks.link.default.shared_libs += libsync.so
183namespace.neuralnetworks.link.default.shared_libs += libvndksupport.so
184
185
186###############################################################################
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900187# Namespace config for binaries under /postinstall.
188# Only one default namespace is defined and it has no directories other than
changho.shin715b1aa2018-11-28 15:15:16 +0900189# /system/lib and /product/lib in the search paths. This is because linker
190# calls realpath on the search paths and this causes selinux denial if the
191# paths (/vendor, /odm) are not allowed to the poinstall binaries.
192# There is no reason to allow the binaries to access the paths.
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900193###############################################################################
194[postinstall]
195namespace.default.isolated = false
changho.shin715b1aa2018-11-28 15:15:16 +0900196namespace.default.search.paths = /system/${LIB}
197namespace.default.search.paths += /product/${LIB}