Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 1 | # Copyright (C) 2018 The Android Open Source Project |
| 2 | # |
| 3 | # Bionic loader config file for the Runtime APEX. |
| 4 | # |
| 5 | # There are no versioned APEX paths here - this APEX module does not support |
| 6 | # having several versions mounted. |
| 7 | |
| 8 | dir.runtime = /apex/com.android.runtime/bin/ |
| 9 | |
| 10 | [runtime] |
Nicolas Geoffray | 584bebe | 2019-01-26 01:07:35 +0000 | [diff] [blame] | 11 | additional.namespaces = platform,conscrypt,runtime |
Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 12 | |
Martin Stjernholm | 70a7611 | 2019-01-22 14:27:54 +0000 | [diff] [blame] | 13 | # Keep in sync with the runtime namespace in /system/etc/ld.config.txt. |
Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 14 | namespace.default.isolated = true |
Martin Stjernholm | 70a7611 | 2019-01-22 14:27:54 +0000 | [diff] [blame] | 15 | # Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by |
| 16 | # libart. |
| 17 | namespace.default.visible = true |
Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 18 | namespace.default.search.paths = /apex/com.android.runtime/${LIB} |
Jiyong Park | f8d8eb9 | 2019-01-24 15:06:21 +0900 | [diff] [blame] | 19 | namespace.default.asan.search.paths = /apex/com.android.runtime/${LIB} |
Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 20 | # odex files are in /system/framework. dalvikvm has to be able to dlopen the |
| 21 | # files for CTS. |
| 22 | namespace.default.permitted.paths = /system/framework |
| 23 | namespace.default.links = platform |
| 24 | # TODO(b/119867084): Restrict fallback to platform namespace to PALette library. |
| 25 | namespace.default.link.platform.allow_all_shared_libs = true |
| 26 | |
Martin Stjernholm | 70a7611 | 2019-01-22 14:27:54 +0000 | [diff] [blame] | 27 | # Keep in sync with the default namespace in /system/etc/ld.config.txt. |
Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 28 | namespace.platform.isolated = true |
| 29 | namespace.platform.search.paths = /system/${LIB} |
Jiyong Park | f8d8eb9 | 2019-01-24 15:06:21 +0900 | [diff] [blame] | 30 | namespace.platform.asan.search.paths = /data/asan/system/${LIB} |
Martin Stjernholm | 799ad14 | 2018-12-19 20:37:27 +0000 | [diff] [blame] | 31 | namespace.platform.links = default |
Jiyong Park | 72209a8 | 2019-01-09 08:30:31 +0900 | [diff] [blame] | 32 | namespace.platform.link.default.shared_libs = libart.so:libartd.so |
Martin Stjernholm | 84bf698 | 2019-02-05 15:07:57 +0000 | [diff] [blame] | 33 | namespace.platform.link.default.shared_libs += libdexfile_external.so |
Martin Stjernholm | 8ab9c57 | 2018-12-21 22:32:48 +0000 | [diff] [blame] | 34 | namespace.platform.link.default.shared_libs += libnativebridge.so |
| 35 | namespace.platform.link.default.shared_libs += libnativehelper.so |
| 36 | namespace.platform.link.default.shared_libs += libnativeloader.so |
Jiyong Park | 923a736 | 2019-01-28 13:36:12 +0900 | [diff] [blame] | 37 | # /system/lib/libc.so, etc are symlinks to /bionic/lib/libc.so, etc. |
| 38 | # Add /bionic/lib to the permitted paths because linker uses realpath(3) |
| 39 | # to check the accessibility of the lib. We could add this to search.paths |
| 40 | # instead but that makes the resolution of bionic libs be dependent on |
| 41 | # the order of /system/lib and /bionic/lib in search.paths. If /bionic/lib |
| 42 | # is after /system/lib, then /bionic/lib is never tried because libc.so |
| 43 | # is always found in /system/lib but fails to pass the accessibility test |
| 44 | # because of its realpath. It's better to not depend on the ordering if |
| 45 | # possible. |
| 46 | namespace.platform.permitted.paths = /bionic/${LIB} |
| 47 | namespace.platform.asan.permitted.paths = /bionic/${LIB} |
Nicolas Geoffray | 37498de | 2019-01-22 08:46:34 +0000 | [diff] [blame] | 48 | |
Nicolas Geoffray | 0299fad | 2019-01-22 14:50:29 +0000 | [diff] [blame] | 49 | # Note that we don't need to link the default namespace with conscrypt: |
| 50 | # the runtime Java code and binaries do not explicitly load native libraries |
| 51 | # from it. |
| 52 | |
Nicolas Geoffray | 37498de | 2019-01-22 08:46:34 +0000 | [diff] [blame] | 53 | ############################################################################### |
| 54 | # "conscrypt" APEX namespace |
| 55 | # |
| 56 | # This namespace is for libraries within the conscrypt APEX. |
| 57 | ############################################################################### |
Nicolas Geoffray | 0299fad | 2019-01-22 14:50:29 +0000 | [diff] [blame] | 58 | |
| 59 | # Keep in sync with conscrypt namespace in /system/etc/ld.config.txt. |
Nicolas Geoffray | 37498de | 2019-01-22 08:46:34 +0000 | [diff] [blame] | 60 | namespace.conscrypt.isolated = true |
| 61 | namespace.conscrypt.visible = true |
| 62 | |
| 63 | namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB} |
Jiyong Park | f8d8eb9 | 2019-01-24 15:06:21 +0900 | [diff] [blame] | 64 | namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB} |
Pete Bentley | dc3d587 | 2019-01-31 11:06:00 +0000 | [diff] [blame] | 65 | namespace.conscrypt.links = runtime,platform |
| 66 | namespace.conscrypt.link.runtime.shared_libs = libjavacore.so |
Nicolas Geoffray | 37498de | 2019-01-22 08:46:34 +0000 | [diff] [blame] | 67 | namespace.conscrypt.link.platform.shared_libs = libc.so |
| 68 | namespace.conscrypt.link.platform.shared_libs += libm.so |
| 69 | namespace.conscrypt.link.platform.shared_libs += libdl.so |
Nicolas Geoffray | 584bebe | 2019-01-26 01:07:35 +0000 | [diff] [blame] | 70 | |
| 71 | ############################################################################### |
| 72 | # "runtime" APEX namespace |
| 73 | # |
| 74 | # This namespace is an alias for the default namespace. |
| 75 | ############################################################################### |
| 76 | namespace.runtime.isolated = true |
| 77 | namespace.runtime.visible = true |
| 78 | namespace.runtime.links = default |
| 79 | namespace.runtime.link.default.allow_all_shared_libs = true |
Nicolas Geoffray | 4271e9f | 2019-01-28 10:17:01 +0000 | [diff] [blame] | 80 | namespace.runtime.links += platform |
Nicolas Geoffray | 584bebe | 2019-01-26 01:07:35 +0000 | [diff] [blame] | 81 | # TODO(b/119867084): Restrict fallback to platform namespace to PALette library. |
| 82 | namespace.runtime.link.platform.allow_all_shared_libs = true |