Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Bionic loader config file. |
| 4 | # |
| 5 | |
| 6 | # Don't change the order here. The first pattern that matches with the |
Steven Moreland | ab338c1 | 2017-11-28 12:41:56 -0800 | [diff] [blame] | 7 | # absolute path of an executable is selected. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 8 | dir.system = /system/bin/ |
| 9 | dir.system = /system/xbin/ |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 10 | dir.system = /%PRODUCT%/bin/ |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 11 | |
| 12 | dir.vendor = /odm/bin/ |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 13 | dir.vendor = /vendor/bin/ |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 14 | dir.vendor = /data/nativetest/odm |
| 15 | dir.vendor = /data/nativetest64/odm |
| 16 | dir.vendor = /data/benchmarktest/odm |
| 17 | dir.vendor = /data/benchmarktest64/odm |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 18 | dir.vendor = /data/nativetest/vendor |
| 19 | dir.vendor = /data/nativetest64/vendor |
| 20 | dir.vendor = /data/benchmarktest/vendor |
| 21 | dir.vendor = /data/benchmarktest64/vendor |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 22 | |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 23 | dir.unrestricted = /data/nativetest/unrestricted |
| 24 | dir.unrestricted = /data/nativetest64/unrestricted |
| 25 | |
| 26 | # TODO(b/123864775): Ensure tests are run from /data/nativetest{,64} or (if |
| 27 | # necessary) the unrestricted subdirs above. Then clean this up. |
| 28 | dir.unrestricted = /data/local/tmp |
| 29 | |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 30 | dir.postinstall = /postinstall |
| 31 | |
Martin Stjernholm | adf4503 | 2019-03-26 16:30:23 +0000 | [diff] [blame^] | 32 | # Fallback entry to provide APEX namespace lookups for binaries anywhere else. |
| 33 | # This must be last. |
| 34 | dir.system = /data |
| 35 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 36 | [system] |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 37 | additional.namespaces = runtime,conscrypt,media,resolv,sphal,vndk,rs |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 38 | |
| 39 | ############################################################################### |
| 40 | # "default" namespace |
| 41 | # |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 42 | # Framework-side code runs in this namespace. Libs from /vendor partition |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 43 | # can't be loaded in this namespace. |
| 44 | ############################################################################### |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 45 | namespace.default.isolated = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 46 | |
Roland Levillain | 9b79db5 | 2018-12-11 10:20:33 +0000 | [diff] [blame] | 47 | namespace.default.search.paths = /system/${LIB} |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 48 | namespace.default.search.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 49 | namespace.default.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 50 | |
| 51 | # We can't have entire /system/${LIB} as permitted paths because doing so |
| 52 | # makes it possible to load libs in /system/${LIB}/vndk* directories by |
| 53 | # their absolute paths (e.g. dlopen("/system/lib/vndk/libbase.so");). |
| 54 | # VNDK libs are built with previous versions of Android and thus must not be |
| 55 | # loaded into this namespace where libs built with the current version of |
| 56 | # Android are loaded. Mixing the two types of libs in the same namespace can |
| 57 | # cause unexpected problem. |
| 58 | namespace.default.permitted.paths = /system/${LIB}/drm |
| 59 | namespace.default.permitted.paths += /system/${LIB}/extractors |
| 60 | namespace.default.permitted.paths += /system/${LIB}/hw |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 61 | namespace.default.permitted.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 62 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 63 | # These are where odex files are located. libart has to be able to dlopen the files |
| 64 | namespace.default.permitted.paths += /system/framework |
| 65 | namespace.default.permitted.paths += /system/app |
| 66 | namespace.default.permitted.paths += /system/priv-app |
| 67 | namespace.default.permitted.paths += /vendor/framework |
| 68 | namespace.default.permitted.paths += /vendor/app |
| 69 | namespace.default.permitted.paths += /vendor/priv-app |
Felix | 9e40e12 | 2019-03-02 23:54:21 +0100 | [diff] [blame] | 70 | namespace.default.permitted.paths += /system/vendor/framework |
| 71 | namespace.default.permitted.paths += /system/vendor/app |
| 72 | namespace.default.permitted.paths += /system/vendor/priv-app |
Bowgo Tsai | 39476ff | 2018-03-14 16:19:03 +0800 | [diff] [blame] | 73 | namespace.default.permitted.paths += /odm/framework |
| 74 | namespace.default.permitted.paths += /odm/app |
| 75 | namespace.default.permitted.paths += /odm/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 76 | namespace.default.permitted.paths += /oem/app |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 77 | namespace.default.permitted.paths += /%PRODUCT%/framework |
| 78 | namespace.default.permitted.paths += /%PRODUCT%/app |
| 79 | namespace.default.permitted.paths += /%PRODUCT%/priv-app |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 80 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/framework |
| 81 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/app |
| 82 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 83 | namespace.default.permitted.paths += /data |
| 84 | namespace.default.permitted.paths += /mnt/expand |
Jiyong Park | 7b4801a | 2019-02-25 16:41:38 +0900 | [diff] [blame] | 85 | namespace.default.permitted.paths += /apex/com.android.runtime/${LIB}/bionic |
Jiyong Park | 6866041 | 2019-01-16 23:00:59 +0900 | [diff] [blame] | 86 | namespace.default.permitted.paths += /system/${LIB}/bootstrap |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 87 | |
| 88 | namespace.default.asan.search.paths = /data/asan/system/${LIB} |
| 89 | namespace.default.asan.search.paths += /system/${LIB} |
Anton Hansson | 2dae6f0 | 2019-02-05 12:36:58 +0000 | [diff] [blame] | 90 | namespace.default.asan.search.paths += /data/asan/%PRODUCT%/${LIB} |
Anton Hansson | 0244428 | 2018-09-19 00:39:39 +0100 | [diff] [blame] | 91 | namespace.default.asan.search.paths += /%PRODUCT%/${LIB} |
Anton Hansson | 2dae6f0 | 2019-02-05 12:36:58 +0000 | [diff] [blame] | 92 | namespace.default.asan.search.paths += /data/asan/%PRODUCT_SERVICES%/${LIB} |
Anton Hansson | 0244428 | 2018-09-19 00:39:39 +0100 | [diff] [blame] | 93 | namespace.default.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 94 | |
| 95 | namespace.default.asan.permitted.paths = /data |
| 96 | namespace.default.asan.permitted.paths += /system/${LIB}/drm |
| 97 | namespace.default.asan.permitted.paths += /system/${LIB}/extractors |
| 98 | namespace.default.asan.permitted.paths += /system/${LIB}/hw |
| 99 | namespace.default.asan.permitted.paths += /system/framework |
| 100 | namespace.default.asan.permitted.paths += /system/app |
| 101 | namespace.default.asan.permitted.paths += /system/priv-app |
| 102 | namespace.default.asan.permitted.paths += /vendor/framework |
| 103 | namespace.default.asan.permitted.paths += /vendor/app |
| 104 | namespace.default.asan.permitted.paths += /vendor/priv-app |
Felix | 9e40e12 | 2019-03-02 23:54:21 +0100 | [diff] [blame] | 105 | namespace.default.asan.permitted.paths += /system/vendor/framework |
| 106 | namespace.default.asan.permitted.paths += /system/vendor/app |
| 107 | namespace.default.asan.permitted.paths += /system/vendor/priv-app |
Bowgo Tsai | 39476ff | 2018-03-14 16:19:03 +0800 | [diff] [blame] | 108 | namespace.default.asan.permitted.paths += /odm/framework |
| 109 | namespace.default.asan.permitted.paths += /odm/app |
| 110 | namespace.default.asan.permitted.paths += /odm/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 111 | namespace.default.asan.permitted.paths += /oem/app |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 112 | namespace.default.asan.permitted.paths += /%PRODUCT%/${LIB} |
| 113 | namespace.default.asan.permitted.paths += /%PRODUCT%/framework |
| 114 | namespace.default.asan.permitted.paths += /%PRODUCT%/app |
| 115 | namespace.default.asan.permitted.paths += /%PRODUCT%/priv-app |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 116 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/${LIB} |
| 117 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/framework |
| 118 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/app |
| 119 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 120 | namespace.default.asan.permitted.paths += /mnt/expand |
Jiyong Park | 7b4801a | 2019-02-25 16:41:38 +0900 | [diff] [blame] | 121 | namespace.default.asan.permitted.paths += /apex/com.android.runtime/${LIB}/bionic |
Jiyong Park | 6866041 | 2019-01-16 23:00:59 +0900 | [diff] [blame] | 122 | namespace.default.asan.permitted.paths += /system/${LIB}/bootstrap |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 123 | |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 124 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
chenbruce | d771740 | 2019-01-29 11:52:41 +0800 | [diff] [blame] | 125 | # If a shared library or an executable requests a shared library that |
| 126 | # cannot be loaded into the default namespace, the dynamic linker tries |
Roland Levillain | e51c876 | 2019-03-07 19:06:57 +0000 | [diff] [blame] | 127 | # to load the shared library from the runtime namespace. And then, if the |
chenbruce | d771740 | 2019-01-29 11:52:41 +0800 | [diff] [blame] | 128 | # shared library cannot be loaded from the runtime namespace either, the |
| 129 | # dynamic linker tries to load the shared library from the resolv namespace. |
| 130 | # Finally, if all attempts fail, the dynamic linker returns an error. |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 131 | namespace.default.links = runtime,resolv |
Martin Stjernholm | 1fc8a55 | 2019-01-22 14:32:46 +0000 | [diff] [blame] | 132 | # Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by |
| 133 | # libart. |
| 134 | namespace.default.visible = true |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 135 | namespace.default.link.runtime.shared_libs = libart.so:libartd.so |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 136 | namespace.default.link.runtime.shared_libs += libdexfile_external.so |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 137 | namespace.default.link.runtime.shared_libs += libnativebridge.so |
| 138 | namespace.default.link.runtime.shared_libs += libnativehelper.so |
| 139 | namespace.default.link.runtime.shared_libs += libnativeloader.so |
Victor Chang | 785ba2e | 2019-01-15 18:04:56 +0000 | [diff] [blame] | 140 | namespace.default.link.runtime.shared_libs += libandroidicu.so |
| 141 | |
| 142 | # TODO(b/122876336): Remove libpac.so once it's migrated to Webview |
| 143 | namespace.default.link.runtime.shared_libs += libpac.so |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 144 | |
chenbruce | d771740 | 2019-01-29 11:52:41 +0800 | [diff] [blame] | 145 | # When libnetd_resolv.so can't be found in the default namespace, search for it |
| 146 | # in the resolv namespace. Don't allow any other libraries from the resolv namespace |
| 147 | # to be loaded in the default namespace. |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 148 | namespace.default.link.resolv.shared_libs = libnetd_resolv.so |
| 149 | |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 150 | ############################################################################### |
| 151 | # "runtime" APEX namespace |
| 152 | # |
| 153 | # This namespace exposes externally accessible libraries from the Runtime APEX. |
| 154 | ############################################################################### |
| 155 | namespace.runtime.isolated = true |
Nicolas Geoffray | a9b4f2b | 2019-01-26 01:06:43 +0000 | [diff] [blame] | 156 | namespace.runtime.visible = true |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 157 | |
| 158 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 159 | namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} |
Jiyong Park | 59e355c | 2019-01-24 15:08:06 +0900 | [diff] [blame] | 160 | namespace.runtime.asan.search.paths = /apex/com.android.runtime/${LIB} |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 161 | namespace.runtime.links = default |
| 162 | # TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library |
| 163 | # when it exists. |
| 164 | namespace.runtime.link.default.allow_all_shared_libs = true |
| 165 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 166 | ############################################################################### |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 167 | # "media" APEX namespace |
| 168 | # |
| 169 | # This namespace is for libraries within the media APEX. |
| 170 | ############################################################################### |
| 171 | namespace.media.isolated = true |
| 172 | namespace.media.visible = true |
| 173 | |
| 174 | namespace.media.search.paths = /apex/com.android.media/${LIB} |
Jiyong Park | 59e355c | 2019-01-24 15:08:06 +0900 | [diff] [blame] | 175 | namespace.media.asan.search.paths = /apex/com.android.media/${LIB} |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 176 | |
Dongwon Kang | 3408eaa | 2019-02-22 00:47:13 -0800 | [diff] [blame] | 177 | namespace.media.permitted.paths = /apex/com.android.media/${LIB}/extractors |
| 178 | |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 179 | namespace.media.links = default |
| 180 | namespace.media.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 181 | namespace.media.link.default.shared_libs += libandroid.so |
| 182 | namespace.media.link.default.shared_libs += libbinder_ndk.so |
Ray Essick | baa0ce3 | 2019-01-24 13:03:02 -0800 | [diff] [blame] | 183 | namespace.media.link.default.shared_libs += libmediametrics.so |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 184 | namespace.media.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
| 185 | |
| 186 | ############################################################################### |
Nicolas Geoffray | 890e3bf | 2019-01-22 09:11:57 +0000 | [diff] [blame] | 187 | # "conscrypt" APEX namespace |
| 188 | # |
| 189 | # This namespace is for libraries within the conscrypt APEX. |
| 190 | ############################################################################### |
| 191 | namespace.conscrypt.isolated = true |
| 192 | namespace.conscrypt.visible = true |
| 193 | |
Nicolas Geoffray | 88bdf80 | 2019-01-22 14:52:51 +0000 | [diff] [blame] | 194 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
Nicolas Geoffray | 890e3bf | 2019-01-22 09:11:57 +0000 | [diff] [blame] | 195 | namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB} |
Jiyong Park | 59e355c | 2019-01-24 15:08:06 +0900 | [diff] [blame] | 196 | namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB} |
Pete Bentley | 7b967bf | 2019-01-30 18:35:48 +0000 | [diff] [blame] | 197 | namespace.conscrypt.links = runtime,default |
Pete Bentley | cc6c50a | 2019-03-21 17:13:14 +0000 | [diff] [blame] | 198 | namespace.conscrypt.link.runtime.shared_libs = libandroidio.so |
Nicolas Geoffray | 88bdf80 | 2019-01-22 14:52:51 +0000 | [diff] [blame] | 199 | namespace.conscrypt.link.default.shared_libs = libc.so |
| 200 | namespace.conscrypt.link.default.shared_libs += libm.so |
| 201 | namespace.conscrypt.link.default.shared_libs += libdl.so |
Tom Cherry | fe1f701 | 2019-02-08 11:55:36 -0800 | [diff] [blame] | 202 | namespace.conscrypt.link.default.shared_libs += liblog.so |
Nicolas Geoffray | 890e3bf | 2019-01-22 09:11:57 +0000 | [diff] [blame] | 203 | |
| 204 | ############################################################################### |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 205 | # "resolv" APEX namespace |
| 206 | # |
| 207 | # This namespace is for libraries within the resolv APEX. |
| 208 | ############################################################################### |
| 209 | namespace.resolv.isolated = true |
| 210 | namespace.resolv.visible = true |
| 211 | |
| 212 | namespace.resolv.search.paths = /apex/com.android.resolv/${LIB} |
| 213 | namespace.resolv.asan.search.paths = /apex/com.android.resolv/${LIB} |
| 214 | namespace.resolv.links = default |
| 215 | namespace.resolv.link.default.shared_libs = libc.so |
| 216 | namespace.resolv.link.default.shared_libs += libm.so |
| 217 | namespace.resolv.link.default.shared_libs += libdl.so |
| 218 | namespace.resolv.link.default.shared_libs += libbinder_ndk.so |
Tom Cherry | fe1f701 | 2019-02-08 11:55:36 -0800 | [diff] [blame] | 219 | namespace.resolv.link.default.shared_libs += liblog.so |
Dongwon Kang | 9dff515 | 2019-02-08 14:00:35 -0800 | [diff] [blame] | 220 | namespace.resolv.link.default.shared_libs += libvndksupport.so |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 221 | |
| 222 | ############################################################################### |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 223 | # "sphal" namespace |
| 224 | # |
| 225 | # SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be |
| 226 | # loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, |
| 227 | # android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. |
| 228 | # |
| 229 | # This namespace is exclusivly for SP-HALs. When the framework tries to dynami- |
| 230 | # cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying |
| 231 | # that they should be searched and loaded from this namespace. |
| 232 | # |
| 233 | # Note that there is no link from the default namespace to this namespace. |
| 234 | ############################################################################### |
| 235 | namespace.sphal.isolated = true |
| 236 | namespace.sphal.visible = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 237 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 238 | namespace.sphal.search.paths = /odm/${LIB} |
| 239 | namespace.sphal.search.paths += /vendor/${LIB} |
Jesse Hall | bdebda2 | 2019-01-31 17:50:17 -0800 | [diff] [blame] | 240 | namespace.sphal.search.paths += /vendor/${LIB}/hw |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 241 | |
| 242 | namespace.sphal.permitted.paths = /odm/${LIB} |
| 243 | namespace.sphal.permitted.paths += /vendor/${LIB} |
Felix | 9e40e12 | 2019-03-02 23:54:21 +0100 | [diff] [blame] | 244 | namespace.sphal.permitted.paths += /system/vendor/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 245 | |
| 246 | namespace.sphal.asan.search.paths = /data/asan/odm/${LIB} |
| 247 | namespace.sphal.asan.search.paths += /odm/${LIB} |
| 248 | namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB} |
| 249 | namespace.sphal.asan.search.paths += /vendor/${LIB} |
| 250 | |
| 251 | namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB} |
| 252 | namespace.sphal.asan.permitted.paths += /odm/${LIB} |
| 253 | namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB} |
| 254 | namespace.sphal.asan.permitted.paths += /vendor/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 255 | |
| 256 | # Once in this namespace, access to libraries in /system/lib is restricted. Only |
| 257 | # libs listed here can be used. |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 258 | namespace.sphal.links = default,vndk,rs |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 259 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 260 | namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 261 | namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 262 | |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 263 | namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 264 | |
| 265 | # Renderscript gets separate namespace |
| 266 | namespace.sphal.link.rs.shared_libs = libRS_internal.so |
| 267 | |
| 268 | ############################################################################### |
| 269 | # "rs" namespace |
| 270 | # |
| 271 | # This namespace is exclusively for Renderscript internal libraries. |
| 272 | # This namespace has slightly looser restriction than the vndk namespace because |
| 273 | # of the genuine characteristics of Renderscript; /data is in the permitted path |
| 274 | # to load the compiled *.so file and libmediandk.so can be used here. |
| 275 | ############################################################################### |
| 276 | namespace.rs.isolated = true |
| 277 | namespace.rs.visible = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 278 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 279 | namespace.rs.search.paths = /odm/${LIB}/vndk-sp |
| 280 | namespace.rs.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 281 | namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 282 | namespace.rs.search.paths += /odm/${LIB} |
| 283 | namespace.rs.search.paths += /vendor/${LIB} |
| 284 | |
| 285 | namespace.rs.permitted.paths = /odm/${LIB} |
| 286 | namespace.rs.permitted.paths += /vendor/${LIB} |
Felix | 9e40e12 | 2019-03-02 23:54:21 +0100 | [diff] [blame] | 287 | namespace.rs.permitted.paths += /system/vendor/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 288 | namespace.rs.permitted.paths += /data |
| 289 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 290 | namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp |
| 291 | namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp |
| 292 | namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 293 | namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 294 | namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% |
| 295 | namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 296 | namespace.rs.asan.search.paths += /data/asan/odm/${LIB} |
| 297 | namespace.rs.asan.search.paths += /odm/${LIB} |
| 298 | namespace.rs.asan.search.paths += /data/asan/vendor/${LIB} |
| 299 | namespace.rs.asan.search.paths += /vendor/${LIB} |
| 300 | |
| 301 | namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB} |
| 302 | namespace.rs.asan.permitted.paths += /odm/${LIB} |
| 303 | namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB} |
| 304 | namespace.rs.asan.permitted.paths += /vendor/${LIB} |
| 305 | namespace.rs.asan.permitted.paths += /data |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 306 | |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 307 | namespace.rs.links = default,vndk |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 308 | |
| 309 | namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 310 | namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame] | 311 | # Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this |
| 312 | # namespace because RS framework libs are using them. |
| 313 | namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 314 | |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 315 | namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 316 | |
| 317 | ############################################################################### |
| 318 | # "vndk" namespace |
| 319 | # |
| 320 | # This namespace is exclusively for vndk-sp libs. |
| 321 | ############################################################################### |
| 322 | namespace.vndk.isolated = true |
Jiyong Park | a07f305 | 2017-08-22 10:26:10 +0900 | [diff] [blame] | 323 | namespace.vndk.visible = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 324 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 325 | namespace.vndk.search.paths = /odm/${LIB}/vndk-sp |
| 326 | namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 327 | namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 328 | |
| 329 | namespace.vndk.permitted.paths = /odm/${LIB}/hw |
| 330 | namespace.vndk.permitted.paths += /odm/${LIB}/egl |
| 331 | namespace.vndk.permitted.paths += /vendor/${LIB}/hw |
| 332 | namespace.vndk.permitted.paths += /vendor/${LIB}/egl |
Felix | 9e40e12 | 2019-03-02 23:54:21 +0100 | [diff] [blame] | 333 | namespace.vndk.permitted.paths += /system/vendor/${LIB}/hw |
| 334 | namespace.vndk.permitted.paths += /system/vendor/${LIB}/egl |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 335 | # This is exceptionally required since android.hidl.memory@1.0-impl.so is here |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 336 | namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 337 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 338 | namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp |
| 339 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp |
| 340 | namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 341 | namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 342 | namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% |
| 343 | namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 344 | |
| 345 | namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw |
| 346 | namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw |
| 347 | namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl |
| 348 | namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl |
| 349 | namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw |
| 350 | namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw |
| 351 | namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl |
| 352 | namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl |
| 353 | |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 354 | namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw |
| 355 | namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 356 | |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 357 | # The "vndk" namespace links to "default" namespace for LLNDK libs and links to |
| 358 | # "sphal" namespace for vendor libs. The ordering matters. The "default" |
| 359 | # namespace has higher priority than the "sphal" namespace. |
| 360 | namespace.vndk.links = default,sphal |
Logan Chien | 8667747 | 2018-03-29 14:08:48 +0800 | [diff] [blame] | 361 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 362 | # When these NDK libs are required inside this namespace, then it is redirected |
| 363 | # to the default namespace. This is possible since their ABI is stable across |
| 364 | # Android releases. |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 365 | namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 366 | namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 367 | |
Logan Chien | 8667747 | 2018-03-29 14:08:48 +0800 | [diff] [blame] | 368 | # Allow VNDK-SP extensions to use vendor libraries |
| 369 | namespace.vndk.link.sphal.allow_all_shared_libs = true |
| 370 | |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 371 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 372 | ############################################################################### |
| 373 | # Namespace config for vendor processes. In O, no restriction is enforced for |
| 374 | # them. However, in O-MR1, access to /system/${LIB} will not be allowed to |
| 375 | # the default namespace. 'system' namespace will be added to give limited |
| 376 | # (LL-NDK only) access. |
| 377 | ############################################################################### |
| 378 | [vendor] |
Vic Yang | 19b3a51 | 2018-11-12 20:28:21 -0800 | [diff] [blame] | 379 | additional.namespaces = runtime,system,vndk%VNDK_IN_SYSTEM_NS% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 380 | |
| 381 | ############################################################################### |
| 382 | # "default" namespace |
| 383 | # |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame] | 384 | # This is the default linker namespace for a vendor process (a process started |
| 385 | # from /vendor/bin/*). The main executable and the libs under /vendor/lib[64] |
| 386 | # are loaded directly into this namespace. However, other libs under the system |
| 387 | # partition (VNDK and LLNDK libraries) are not loaded here but from the |
| 388 | # separate namespace 'system'. The delegation to the system namespace is done |
| 389 | # via the 'namespace.default.link.system.shared_libs' property below. |
Justin Yun | 5579bf1 | 2019-01-25 19:19:36 +0900 | [diff] [blame] | 390 | # |
| 391 | # '#VNDK27#' TAG is only for building ld.config.27.txt for backward |
| 392 | # compatibility. (TODO:b/123390078) Move them to a separate file. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 393 | ############################################################################### |
| 394 | namespace.default.isolated = true |
| 395 | namespace.default.visible = true |
| 396 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 397 | namespace.default.search.paths = /odm/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 398 | namespace.default.search.paths += /vendor/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 399 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 400 | namespace.default.permitted.paths = /odm |
| 401 | namespace.default.permitted.paths += /vendor |
Felix | 9e40e12 | 2019-03-02 23:54:21 +0100 | [diff] [blame] | 402 | namespace.default.permitted.paths += /system/vendor |
Justin Yun | 5579bf1 | 2019-01-25 19:19:36 +0900 | [diff] [blame] | 403 | #VNDK27#namespace.default.search.paths += /vendor/${LIB}/hw |
| 404 | #VNDK27#namespace.default.search.paths += /vendor/${LIB}/egl |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 405 | |
| 406 | namespace.default.asan.search.paths = /data/asan/odm/${LIB} |
| 407 | namespace.default.asan.search.paths += /odm/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 408 | namespace.default.asan.search.paths += /data/asan/vendor/${LIB} |
| 409 | namespace.default.asan.search.paths += /vendor/${LIB} |
Justin Yun | 5579bf1 | 2019-01-25 19:19:36 +0900 | [diff] [blame] | 410 | #VNDK27#namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/hw |
| 411 | #VNDK27#namespace.default.asan.search.paths += /vendor/${LIB}/hw |
| 412 | #VNDK27#namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/egl |
| 413 | #VNDK27#namespace.default.asan.search.paths += /vendor/${LIB}/egl |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 414 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 415 | namespace.default.asan.permitted.paths = /data/asan/odm |
| 416 | namespace.default.asan.permitted.paths += /odm |
| 417 | namespace.default.asan.permitted.paths += /data/asan/vendor |
| 418 | namespace.default.asan.permitted.paths += /vendor |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 419 | |
Vic Yang | 19b3a51 | 2018-11-12 20:28:21 -0800 | [diff] [blame] | 420 | namespace.default.links = system,vndk%VNDK_IN_SYSTEM_NS% |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 421 | namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES% |
Vic Yang | 19b3a51 | 2018-11-12 20:28:21 -0800 | [diff] [blame] | 422 | namespace.default.link.vndk_in_system.shared_libs = %VNDK_USING_CORE_VARIANT_LIBRARIES% |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 423 | namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
| 424 | namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES% |
| 425 | |
| 426 | ############################################################################### |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 427 | # "runtime" APEX namespace |
| 428 | # |
| 429 | # This namespace exposes externally accessible libraries from the Runtime APEX. |
| 430 | ############################################################################### |
| 431 | namespace.runtime.isolated = true |
| 432 | |
| 433 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 434 | namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} |
Logan Chien | f7b46a2 | 2019-02-12 20:02:05 +0800 | [diff] [blame] | 435 | namespace.runtime.asan.search.paths = /apex/com.android.runtime/${LIB} |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 436 | namespace.runtime.links = system |
| 437 | # TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library |
| 438 | # when it exists. |
| 439 | namespace.runtime.link.system.allow_all_shared_libs = true |
| 440 | |
| 441 | ############################################################################### |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 442 | # "vndk" namespace |
| 443 | # |
| 444 | # This namespace is where VNDK and VNDK-SP libraries are loaded for |
| 445 | # a vendor process. |
| 446 | ############################################################################### |
| 447 | namespace.vndk.isolated = false |
| 448 | |
Logan Chien | 91b3fb4 | 2018-01-11 20:00:37 +0800 | [diff] [blame] | 449 | namespace.vndk.search.paths = /odm/${LIB}/vndk |
| 450 | namespace.vndk.search.paths += /odm/${LIB}/vndk-sp |
| 451 | namespace.vndk.search.paths += /vendor/${LIB}/vndk |
| 452 | namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp |
| 453 | namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 454 | namespace.vndk.search.paths += /system/${LIB}/vndk%VNDK_VER% |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 455 | |
Logan Chien | 91b3fb4 | 2018-01-11 20:00:37 +0800 | [diff] [blame] | 456 | namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk |
| 457 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk |
| 458 | namespace.vndk.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp |
| 459 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp |
| 460 | namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk |
| 461 | namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk |
| 462 | namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 463 | namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp |
| 464 | namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 465 | namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
| 466 | namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER% |
| 467 | namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER% |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 468 | |
| 469 | # When these NDK libs are required inside this namespace, then it is redirected |
| 470 | # to the system namespace. This is possible since their ABI is stable across |
Vic Yang | 19b3a51 | 2018-11-12 20:28:21 -0800 | [diff] [blame] | 471 | # Android releases. The links here should be identical to that of the |
| 472 | # 'vndk_in_system' namespace, except for the link between 'vndk' and |
| 473 | # 'vndk_in_system'. |
| 474 | namespace.vndk.links = system,default%VNDK_IN_SYSTEM_NS% |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 475 | |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 476 | namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES% |
| 477 | namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 478 | |
Logan Chien | ea4a2bd | 2018-01-18 12:06:14 +0800 | [diff] [blame] | 479 | namespace.vndk.link.default.allow_all_shared_libs = true |
| 480 | |
Vic Yang | 19b3a51 | 2018-11-12 20:28:21 -0800 | [diff] [blame] | 481 | namespace.vndk.link.vndk_in_system.shared_libs = %VNDK_USING_CORE_VARIANT_LIBRARIES% |
| 482 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 483 | ############################################################################### |
| 484 | # "system" namespace |
| 485 | # |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame] | 486 | # This namespace is where system libs (VNDK and LLNDK libs) are loaded for |
| 487 | # a vendor process. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 488 | ############################################################################### |
| 489 | namespace.system.isolated = false |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 490 | |
Roland Levillain | 9b79db5 | 2018-12-11 10:20:33 +0000 | [diff] [blame] | 491 | namespace.system.search.paths = /system/${LIB} |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 492 | namespace.system.search.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 493 | namespace.system.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 494 | |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 495 | namespace.system.asan.search.paths = /data/asan/system/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 496 | namespace.system.asan.search.paths += /system/${LIB} |
Inseob Kim | 67cb056 | 2018-05-04 11:39:12 +0900 | [diff] [blame] | 497 | namespace.system.asan.search.paths += /data/asan/product/${LIB} |
Anton Hansson | 0244428 | 2018-09-19 00:39:39 +0100 | [diff] [blame] | 498 | namespace.system.asan.search.paths += /%PRODUCT%/${LIB} |
Anton Hansson | ece0a74 | 2018-09-19 00:51:20 +0100 | [diff] [blame] | 499 | namespace.system.asan.search.paths += /data/asan/product_services/${LIB} |
| 500 | namespace.system.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 501 | |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 502 | namespace.system.links = runtime |
Martin Stjernholm | 60b259b | 2019-01-31 11:55:20 +0000 | [diff] [blame] | 503 | namespace.system.link.runtime.shared_libs = libdexfile_external.so |
| 504 | namespace.system.link.runtime.shared_libs += libnativebridge.so |
| 505 | namespace.system.link.runtime.shared_libs += libnativehelper.so |
| 506 | namespace.system.link.runtime.shared_libs += libnativeloader.so |
Victor Chang | ff67ef3 | 2019-02-19 21:32:07 +0000 | [diff] [blame] | 507 | # Workaround for b/124772622 |
| 508 | namespace.system.link.runtime.shared_libs += libandroidicu.so |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 509 | |
| 510 | ############################################################################### |
Vic Yang | 19b3a51 | 2018-11-12 20:28:21 -0800 | [diff] [blame] | 511 | # "vndk_in_system" namespace |
| 512 | # |
| 513 | # This namespace is where no-vendor-variant VNDK libraries are loaded for a |
| 514 | # vendor process. Note that we do not simply export these libraries from |
| 515 | # "system" namespace, because in some case both the core variant and the |
| 516 | # vendor variant of a VNDK library may be loaded. In such case, we do not |
| 517 | # want to eliminate double-loading because doing so means the global states |
| 518 | # of the library would be shared. |
| 519 | # |
| 520 | # Only the no-vendor-variant VNDK libraries are whitelisted in this namespace. |
| 521 | # This is to ensure that we do not load libraries needed by no-vendor-variant |
| 522 | # VNDK libraries into vndk_in_system namespace. |
| 523 | ############################################################################### |
| 524 | namespace.vndk_in_system.isolated = true |
| 525 | namespace.vndk_in_system.visible = true |
| 526 | |
| 527 | # The search paths here should be kept the same as that of the 'system' |
| 528 | # namespace. |
| 529 | namespace.vndk_in_system.search.paths = /system/${LIB} |
| 530 | namespace.vndk_in_system.search.paths += /%PRODUCT%/${LIB} |
| 531 | namespace.vndk_in_system.search.paths += /%PRODUCT_SERVICES%/${LIB} |
| 532 | |
| 533 | namespace.vndk_in_system.asan.search.paths = /data/asan/system/${LIB} |
| 534 | namespace.vndk_in_system.asan.search.paths += /system/${LIB} |
| 535 | namespace.vndk_in_system.asan.search.paths += /data/asan/product/${LIB} |
| 536 | namespace.vndk_in_system.asan.search.paths += /%PRODUCT%/${LIB} |
| 537 | namespace.vndk_in_system.asan.search.paths += /data/asan/product_services/${LIB} |
| 538 | namespace.vndk_in_system.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} |
| 539 | |
| 540 | namespace.vndk_in_system.whitelisted = %VNDK_USING_CORE_VARIANT_LIBRARIES% |
| 541 | |
| 542 | # The links here should be identical to that of the 'vndk' namespace, with the |
| 543 | # following exception: |
| 544 | # 1. 'vndk_in_system' needs to be freely linked back to 'vndk'. |
| 545 | # 2. 'vndk_in_system' does not need to link to 'default', as any library that |
| 546 | # requires anything vendor would not be a vndk_in_system library. |
| 547 | namespace.vndk_in_system.links = vndk,system |
| 548 | |
| 549 | namespace.vndk_in_system.link.system.shared_libs = %LLNDK_LIBRARIES% |
| 550 | namespace.vndk_in_system.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
| 551 | |
| 552 | namespace.vndk_in_system.link.vndk.allow_all_shared_libs = true |
| 553 | |
| 554 | |
| 555 | ############################################################################### |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 556 | # Namespace config for native tests that need access to both system and vendor |
| 557 | # libraries. This replicates the default linker config (done by |
| 558 | # init_default_namespace_no_config in bionic/linker/linker.cpp), except that it |
| 559 | # includes the requisite namespace setup for APEXes. |
| 560 | ############################################################################### |
| 561 | [unrestricted] |
| 562 | additional.namespaces = runtime,media,conscrypt,resolv |
| 563 | |
| 564 | namespace.default.search.paths = /system/${LIB} |
| 565 | namespace.default.search.paths += /odm/${LIB} |
| 566 | namespace.default.search.paths += /vendor/${LIB} |
| 567 | |
| 568 | namespace.default.asan.search.paths = /data/asan/system/${LIB} |
| 569 | namespace.default.asan.search.paths += /system/${LIB} |
| 570 | namespace.default.asan.search.paths += /data/asan/odm/${LIB} |
| 571 | namespace.default.asan.search.paths += /odm/${LIB} |
| 572 | namespace.default.asan.search.paths += /data/asan/vendor/${LIB} |
| 573 | namespace.default.asan.search.paths += /vendor/${LIB} |
| 574 | |
| 575 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 576 | namespace.default.links = runtime,resolv |
| 577 | namespace.default.visible = true |
| 578 | |
| 579 | namespace.default.link.runtime.shared_libs = libart.so:libartd.so |
| 580 | namespace.default.link.runtime.shared_libs += libdexfile_external.so |
| 581 | namespace.default.link.runtime.shared_libs += libnativebridge.so |
| 582 | namespace.default.link.runtime.shared_libs += libnativehelper.so |
| 583 | namespace.default.link.runtime.shared_libs += libnativeloader.so |
| 584 | namespace.default.link.runtime.shared_libs += libandroidicu.so |
| 585 | |
| 586 | # TODO(b/122876336): Remove libpac.so once it's migrated to Webview |
| 587 | namespace.default.link.runtime.shared_libs += libpac.so |
| 588 | |
| 589 | namespace.default.link.resolv.shared_libs = libnetd_resolv.so |
| 590 | |
| 591 | ############################################################################### |
| 592 | # "runtime" APEX namespace |
| 593 | # |
| 594 | # This namespace exposes externally accessible libraries from the Runtime APEX. |
| 595 | ############################################################################### |
| 596 | namespace.runtime.isolated = true |
| 597 | namespace.runtime.visible = true |
| 598 | |
| 599 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 600 | namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} |
| 601 | namespace.runtime.asan.search.paths = /apex/com.android.runtime/${LIB} |
| 602 | namespace.runtime.links = default |
| 603 | # TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library |
| 604 | # when it exists. |
| 605 | namespace.runtime.link.default.allow_all_shared_libs = true |
| 606 | |
| 607 | ############################################################################### |
| 608 | # "media" APEX namespace |
| 609 | # |
| 610 | # This namespace is for libraries within the media APEX. |
| 611 | ############################################################################### |
| 612 | namespace.media.isolated = true |
| 613 | namespace.media.visible = true |
| 614 | |
| 615 | namespace.media.search.paths = /apex/com.android.media/${LIB} |
| 616 | namespace.media.asan.search.paths = /apex/com.android.media/${LIB} |
| 617 | |
Dongwon Kang | 3408eaa | 2019-02-22 00:47:13 -0800 | [diff] [blame] | 618 | namespace.media.permitted.paths = /apex/com.android.media/${LIB}/extractors |
| 619 | |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 620 | namespace.media.links = default |
| 621 | namespace.media.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 622 | namespace.media.link.default.shared_libs += libandroid.so |
| 623 | namespace.media.link.default.shared_libs += libbinder_ndk.so |
| 624 | namespace.media.link.default.shared_libs += libmediametrics.so |
| 625 | namespace.media.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
| 626 | |
| 627 | ############################################################################### |
| 628 | # "conscrypt" APEX namespace |
| 629 | # |
| 630 | # This namespace is for libraries within the conscrypt APEX. |
| 631 | ############################################################################### |
| 632 | namespace.conscrypt.isolated = true |
| 633 | namespace.conscrypt.visible = true |
| 634 | |
| 635 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 636 | namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB} |
| 637 | namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB} |
| 638 | namespace.conscrypt.links = runtime,default |
Pete Bentley | cc6c50a | 2019-03-21 17:13:14 +0000 | [diff] [blame] | 639 | namespace.conscrypt.link.runtime.shared_libs = libandroidio.so |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 640 | namespace.conscrypt.link.default.shared_libs = libc.so |
| 641 | namespace.conscrypt.link.default.shared_libs += libm.so |
| 642 | namespace.conscrypt.link.default.shared_libs += libdl.so |
Tom Cherry | fe1f701 | 2019-02-08 11:55:36 -0800 | [diff] [blame] | 643 | namespace.conscrypt.link.default.shared_libs += liblog.so |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 644 | |
| 645 | ############################################################################### |
| 646 | # "resolv" APEX namespace |
| 647 | # |
| 648 | # This namespace is for libraries within the resolv APEX. |
| 649 | ############################################################################### |
| 650 | namespace.resolv.isolated = true |
| 651 | namespace.resolv.visible = true |
| 652 | |
| 653 | namespace.resolv.search.paths = /apex/com.android.resolv/${LIB} |
| 654 | namespace.resolv.asan.search.paths = /apex/com.android.resolv/${LIB} |
| 655 | namespace.resolv.links = default |
| 656 | namespace.resolv.link.default.shared_libs = libc.so |
| 657 | namespace.resolv.link.default.shared_libs += libm.so |
| 658 | namespace.resolv.link.default.shared_libs += libdl.so |
| 659 | namespace.resolv.link.default.shared_libs += libbinder_ndk.so |
Tom Cherry | fe1f701 | 2019-02-08 11:55:36 -0800 | [diff] [blame] | 660 | namespace.resolv.link.default.shared_libs += liblog.so |
Martin Stjernholm | bcb5ba7 | 2019-02-11 23:38:27 +0000 | [diff] [blame] | 661 | |
| 662 | |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 663 | ############################################################################### |
| 664 | # Namespace config for binaries under /postinstall. |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 665 | # Only default namespace is defined and default has no directories |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 666 | # other than /system/lib in the search paths. This is because linker calls |
| 667 | # realpath on the search paths and this causes selinux denial if the paths |
| 668 | # (/vendor, /odm) are not allowed to the postinstall binaries. There is no |
| 669 | # reason to allow the binaries to access the paths. |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 670 | ############################################################################### |
| 671 | [postinstall] |
| 672 | namespace.default.isolated = false |
Roland Levillain | 9b79db5 | 2018-12-11 10:20:33 +0000 | [diff] [blame] | 673 | namespace.default.search.paths = /system/${LIB} |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 674 | namespace.default.search.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 675 | namespace.default.search.paths += /%PRODUCT_SERVICES%/${LIB} |