Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 1 | # Copyright (C) 2019 The Android Open Source Project |
| 2 | # |
| 3 | # Bionic loader config file for the media swcodec APEX. |
| 4 | # |
| 5 | # There are no versioned APEX paths here - this APEX module does not support |
| 6 | # having several versions mounted. |
| 7 | |
| 8 | dir.swcodec = /apex/com.android.media.swcodec/bin/ |
| 9 | |
| 10 | [swcodec] |
Chong Zhang | 8146873 | 2019-04-02 10:15:38 -0700 | [diff] [blame] | 11 | additional.namespaces = platform,sphal |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 12 | |
| 13 | ############################################################################### |
| 14 | # "default" namespace |
| 15 | # |
| 16 | # This namespace is for the binaries and libraries on the swcodec APEX. |
| 17 | ############################################################################### |
| 18 | |
| 19 | namespace.default.isolated = true |
| 20 | namespace.default.visible = true |
| 21 | |
| 22 | namespace.default.search.paths = /apex/com.android.media.swcodec/${LIB} |
| 23 | namespace.default.asan.search.paths = /apex/com.android.media.swcodec/${LIB} |
| 24 | |
Jiyong Park | bb8f985 | 2020-01-07 19:54:39 +0900 | [diff] [blame] | 25 | # Below lines are required to be able to access libs in APEXes which are |
| 26 | # actually symlinks to the files under /system/lib. The symlinks exist for |
| 27 | # bundled APEXes to reduce space. |
| 28 | namespace.default.permitted.paths = /system/${LIB} |
| 29 | namespace.default.asan.permitted.paths = /system/${LIB} |
| 30 | |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 31 | namespace.default.links = platform |
| 32 | |
| 33 | # TODO: replace the following when apex has a way to auto-generate this list |
| 34 | # namespace.default.link.platform.shared_libs = %LLNDK_LIBRARIES% |
| 35 | # namespace.default.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
dimitry | a1ce07c | 2019-04-12 15:04:27 +0200 | [diff] [blame] | 36 | namespace.default.link.platform.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libcgrouprc.so:libclang_rt.asan-aarch64-android.so:libclang_rt.asan-arm-android.so:libclang_rt.hwasan-aarch64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.asan-x86_64-android.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libneuralnetworks.so:libsync.so:libvndksupport.so:libdl_android.so:libvulkan.so |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 37 | |
| 38 | ############################################################################### |
| 39 | # "platform" namespace |
| 40 | # |
| 41 | # This namespace is for linking to LLNDK and ASAN libraries on the system. |
| 42 | ############################################################################### |
| 43 | |
| 44 | namespace.platform.isolated = true |
| 45 | |
Peter Collingbourne | 97835e9 | 2019-04-25 23:27:18 -0700 | [diff] [blame] | 46 | namespace.platform.search.paths = /system/${LIB} |
| 47 | namespace.platform.search.paths += /apex/com.android.runtime/${LIB} |
Jiyong Park | 08ad212 | 2019-04-25 12:45:55 +0900 | [diff] [blame] | 48 | namespace.platform.asan.search.paths = /data/asan/system/${LIB} |
| 49 | namespace.platform.asan.search.paths += /system/${LIB} |
Peter Collingbourne | 97835e9 | 2019-04-25 23:27:18 -0700 | [diff] [blame] | 50 | namespace.platform.asan.search.paths += /apex/com.android.runtime/${LIB} |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 51 | |
Dongwon Kang | 82022c1 | 2019-03-18 11:53:26 -0700 | [diff] [blame] | 52 | # /system/lib/libc.so, etc are symlinks to /apex/com.android.lib/lib/bionic/libc.so, etc. |
Jooyung Han | e485c71 | 2019-10-29 05:48:18 +0900 | [diff] [blame] | 53 | # Add /apex/... path to the permitted paths because linker uses realpath(3) |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 54 | # to check the accessibility of the lib. We could add this to search.paths |
| 55 | # instead but that makes the resolution of bionic libs be dependent on |
Jiyong Park | c21e52b | 2019-03-09 17:26:48 +0900 | [diff] [blame] | 56 | # the order of /system/lib and /apex/... in search.paths. If /apex/... |
| 57 | # is after /system/lib, then /apex/... is never tried because libc.so |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 58 | # is always found in /system/lib but fails to pass the accessibility test |
| 59 | # because of its realpath. It's better to not depend on the ordering if |
| 60 | # possible. |
Jiyong Park | c21e52b | 2019-03-09 17:26:48 +0900 | [diff] [blame] | 61 | namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic |
| 62 | namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic |
Chong Zhang | 8146873 | 2019-04-02 10:15:38 -0700 | [diff] [blame] | 63 | |
| 64 | ############################################################################### |
| 65 | # "sphal" namespace |
| 66 | # |
| 67 | ############################################################################### |
| 68 | namespace.sphal.isolated = true |
| 69 | namespace.sphal.visible = true |
| 70 | |
| 71 | # Keep the below in sync with "sphal" namespace in system's /etc/ld.config.txt |
| 72 | # Codec2 has dependencies on some SP-hals (eg. android.hardware.graphics.mapper@2.0) |
| 73 | # These are dlopen'ed by libvndksupport.so. |
| 74 | namespace.sphal.search.paths = /odm/${LIB} |
| 75 | namespace.sphal.search.paths += /vendor/${LIB} |
| 76 | |
| 77 | namespace.sphal.permitted.paths = /odm/${LIB} |
| 78 | namespace.sphal.permitted.paths += /vendor/${LIB} |
| 79 | namespace.sphal.permitted.paths += /vendor/${LIB}/hw |
| 80 | namespace.sphal.permitted.paths += /system/vendor/${LIB} |
| 81 | |
| 82 | namespace.sphal.asan.search.paths = /data/asan/odm/${LIB} |
| 83 | namespace.sphal.asan.search.paths += /odm/${LIB} |
| 84 | namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB} |
| 85 | namespace.sphal.asan.search.paths += /vendor/${LIB} |
| 86 | |
| 87 | namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB} |
| 88 | namespace.sphal.asan.permitted.paths += /odm/${LIB} |
| 89 | namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB} |
| 90 | namespace.sphal.asan.permitted.paths += /vendor/${LIB} |
| 91 | |
| 92 | # Keep the below in sync with "vndk" namespace in system's /etc/ld.config.txt |
| 93 | # System's sphal namespace links to vndk namespace for %VNDK_SAMEPROCESS_LIBRARIES%, |
| 94 | # since we don't have a good way to auto-expand %VNDK_SAMEPROCESS_LIBRARIES%, |
| 95 | # we'll add the vndk paths below. |
| 96 | |
| 97 | namespace.sphal.search.paths += /odm/${LIB}/vndk-sp |
| 98 | namespace.sphal.search.paths += /vendor/${LIB}/vndk-sp |
Jooyung Han | e23a299 | 2019-10-16 22:42:56 +0000 | [diff] [blame] | 99 | namespace.sphal.search.paths += /system/${LIB}/vndk-sp${VNDK_VER} |
Chong Zhang | 8146873 | 2019-04-02 10:15:38 -0700 | [diff] [blame] | 100 | |
| 101 | namespace.sphal.permitted.paths += /odm/${LIB}/hw |
| 102 | namespace.sphal.permitted.paths += /odm/${LIB}/egl |
| 103 | namespace.sphal.permitted.paths += /vendor/${LIB}/hw |
| 104 | namespace.sphal.permitted.paths += /vendor/${LIB}/egl |
| 105 | namespace.sphal.permitted.paths += /system/vendor/${LIB}/hw |
| 106 | namespace.sphal.permitted.paths += /system/vendor/${LIB}/egl |
| 107 | # This is exceptionally required since android.hidl.memory@1.0-impl.so is here |
Jooyung Han | e23a299 | 2019-10-16 22:42:56 +0000 | [diff] [blame] | 108 | namespace.sphal.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw |
Chong Zhang | 8146873 | 2019-04-02 10:15:38 -0700 | [diff] [blame] | 109 | |
| 110 | namespace.sphal.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp |
| 111 | namespace.sphal.asan.search.paths += /odm/${LIB}/vndk-sp |
| 112 | namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 113 | namespace.sphal.asan.search.paths += /vendor/${LIB}/vndk-sp |
Jooyung Han | e23a299 | 2019-10-16 22:42:56 +0000 | [diff] [blame] | 114 | namespace.sphal.asan.search.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER} |
| 115 | namespace.sphal.asan.search.paths += /system/${LIB}/vndk-sp${VNDK_VER} |
Chong Zhang | 8146873 | 2019-04-02 10:15:38 -0700 | [diff] [blame] | 116 | |
| 117 | namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/hw |
| 118 | namespace.sphal.asan.permitted.paths += /odm/${LIB}/hw |
| 119 | namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/egl |
| 120 | namespace.sphal.asan.permitted.paths += /odm/${LIB}/egl |
| 121 | namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/hw |
| 122 | namespace.sphal.asan.permitted.paths += /vendor/${LIB}/hw |
| 123 | namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/egl |
| 124 | namespace.sphal.asan.permitted.paths += /vendor/${LIB}/egl |
| 125 | |
Jooyung Han | e23a299 | 2019-10-16 22:42:56 +0000 | [diff] [blame] | 126 | namespace.sphal.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}/hw |
| 127 | namespace.sphal.asan.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw |
Chong Zhang | 8146873 | 2019-04-02 10:15:38 -0700 | [diff] [blame] | 128 | |
| 129 | # Once in this namespace, access to libraries in /system/lib is restricted. Only |
| 130 | # libs listed here can be used. |
| 131 | namespace.sphal.links = platform |
| 132 | |
| 133 | # TODO: replace the following when apex has a way to auto-generate this list |
| 134 | # namespace.sphal.link.platform.shared_libs = %LLNDK_LIBRARIES% |
| 135 | # namespace.sphal.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
| 136 | namespace.sphal.link.platform.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libcgrouprc.so:libclang_rt.asan-aarch64-android.so:libclang_rt.asan-arm-android.so:libclang_rt.hwasan-aarch64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.asan-x86_64-android.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libneuralnetworks.so:libsync.so:libvndksupport.so:libvulkan.so |
| 137 | |
Dongwon Kang | 3ac3714 | 2019-05-24 20:58:09 -0700 | [diff] [blame] | 138 | # Add a link for libz.so which is llndk on devices where VNDK is not enforced. |
| 139 | namespace.sphal.link.platform.shared_libs += libz.so |
Jooyung Han | e485c71 | 2019-10-29 05:48:18 +0900 | [diff] [blame] | 140 | |
| 141 | # With VNDK APEX, /system/${LIB}/vndk-sp${VNDK_VER} is a symlink to the following. |
| 142 | # Add /apex/... path to the permitted paths because linker uses realpath(3) |
| 143 | # to check the accessibility of the lib. |
| 144 | namespace.sphal.permitted.paths += /apex/com.android.vndk.${VNDK_APEX_VER}/${LIB} |
| 145 | namespace.sphal.asan.permitted.paths += /apex/com.android.vndk.${VNDK_APEX_VER}/${LIB} |