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