blob: 5e3b3f8a3767a74f62f391a4b4beb21704979e36 [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
Jiyong Park450cff42017-04-05 14:24:14 +090017[legacy]
18namespace.default.isolated = false
Jiyong Park2498e1b2017-12-12 22:11:47 +090019
20namespace.default.search.paths = /system/${LIB}
changho.shin715b1aa2018-11-28 15:15:16 +090021namespace.default.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090022namespace.default.search.paths += /vendor/${LIB}
23namespace.default.search.paths += /odm/${LIB}
24
25namespace.default.asan.search.paths = /data/asan/system/${LIB}
26namespace.default.asan.search.paths += /system/${LIB}
changho.shin715b1aa2018-11-28 15:15:16 +090027namespace.default.asan.search.paths += /data/asan/product/${LIB}
28namespace.default.asan.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090029namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
30namespace.default.asan.search.paths += /vendor/${LIB}
changho.shin715b1aa2018-11-28 15:15:16 +090031namespace.default.asan.search.paths += /data/asan/odm/${LIB}
32namespace.default.asan.search.paths += /odm/${LIB}
Jiyong Parkd7e6cb22018-03-20 01:12:31 +090033
34###############################################################################
Nicolas Geoffrayad125602019-01-24 21:20:20 +000035# APEX related namespaces.
36###############################################################################
37
38additional.namespaces = runtime,conscrypt,media
39namespace.default.asan.permitted.paths += /apex/com.android.resolv/${LIB}
40
41# Keep in sync with ld.config.txt in the com.android.runtime APEX.
42namespace.default.links = runtime
43namespace.default.asan.links = runtime
44# Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by
45# libart.
46namespace.default.visible = true
47namespace.default.link.runtime.shared_libs = libart.so:libartd.so
48namespace.default.link.runtime.shared_libs += libdexfile_external.so
49namespace.default.link.runtime.shared_libs += libnativebridge.so
50namespace.default.link.runtime.shared_libs += libnativehelper.so
51namespace.default.link.runtime.shared_libs += libnativeloader.so
52
53###############################################################################
54# "runtime" APEX namespace
55#
56# This namespace exposes externally accessible libraries from the Runtime APEX.
57###############################################################################
58namespace.runtime.isolated = true
Nicolas Geoffraya9b4f2b2019-01-26 01:06:43 +000059namespace.runtime.visible = true
Nicolas Geoffrayad125602019-01-24 21:20:20 +000060
61# Keep in sync with ld.config.txt in the com.android.runtime APEX.
62namespace.runtime.search.paths = /apex/com.android.runtime/${LIB}
63namespace.runtime.asan.search.paths = /apex/com.android.runtime/${LIB}
64namespace.runtime.links = default
65# TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library
66# when it exists.
67namespace.runtime.link.default.allow_all_shared_libs = true
68
69###############################################################################
70# "media" APEX namespace
71#
72# This namespace is for libraries within the media APEX.
73###############################################################################
74namespace.media.isolated = true
75namespace.media.visible = true
76
77namespace.media.search.paths = /apex/com.android.media/${LIB}
78namespace.media.asan.search.paths = /apex/com.android.media/${LIB}
79
80namespace.media.links = default
81namespace.media.link.default.shared_libs = %LLNDK_LIBRARIES%
82namespace.media.link.default.shared_libs += libandroid.so
83namespace.media.link.default.shared_libs += libbinder_ndk.so
Dongwon Kang0095e352019-01-25 09:26:17 -080084namespace.media.link.default.shared_libs += libmediametrics.so
Nicolas Geoffrayad125602019-01-24 21:20:20 +000085namespace.media.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
86
87###############################################################################
88# "conscrypt" APEX namespace
89#
90# This namespace is for libraries within the conscrypt APEX.
91###############################################################################
92namespace.conscrypt.isolated = true
93namespace.conscrypt.visible = true
94
95# Keep in sync with ld.config.txt in the com.android.runtime APEX.
96namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB}
97namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB}
98namespace.conscrypt.links = default
99namespace.conscrypt.link.default.shared_libs = libc.so
100namespace.conscrypt.link.default.shared_libs += libm.so
101namespace.conscrypt.link.default.shared_libs += libdl.so
102
103###############################################################################
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900104# Namespace config for binaries under /postinstall.
105# Only one default namespace is defined and it has no directories other than
changho.shin715b1aa2018-11-28 15:15:16 +0900106# /system/lib and /product/lib in the search paths. This is because linker
107# calls realpath on the search paths and this causes selinux denial if the
108# paths (/vendor, /odm) are not allowed to the poinstall binaries.
109# There is no reason to allow the binaries to access the paths.
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900110###############################################################################
111[postinstall]
112namespace.default.isolated = false
changho.shin715b1aa2018-11-28 15:15:16 +0900113namespace.default.search.paths = /system/${LIB}
114namespace.default.search.paths += /product/${LIB}