blob: f739cc31fbf641b76e2b75915e391e5607bd2373 [file] [log] [blame]
Chong Zhang9bda4522019-02-27 13:43:50 -08001# 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
8dir.swcodec = /apex/com.android.media.swcodec/bin/
9
10[swcodec]
Chong Zhang81468732019-04-02 10:15:38 -070011additional.namespaces = platform,sphal
Chong Zhang9bda4522019-02-27 13:43:50 -080012
13###############################################################################
14# "default" namespace
15#
16# This namespace is for the binaries and libraries on the swcodec APEX.
17###############################################################################
18
19namespace.default.isolated = true
20namespace.default.visible = true
21
22namespace.default.search.paths = /apex/com.android.media.swcodec/${LIB}
23namespace.default.asan.search.paths = /apex/com.android.media.swcodec/${LIB}
24
Chong Zhang9bda4522019-02-27 13:43:50 -080025namespace.default.links = platform
26
27# TODO: replace the following when apex has a way to auto-generate this list
28# namespace.default.link.platform.shared_libs = %LLNDK_LIBRARIES%
29# namespace.default.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
dimitrya1ce07c2019-04-12 15:04:27 +020030namespace.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 Zhang9bda4522019-02-27 13:43:50 -080031
32###############################################################################
33# "platform" namespace
34#
35# This namespace is for linking to LLNDK and ASAN libraries on the system.
36###############################################################################
37
38namespace.platform.isolated = true
39
Peter Collingbourne61f5fdf2019-04-25 23:27:18 -070040namespace.platform.search.paths = /system/${LIB}
Jiyong Park08ad2122019-04-25 12:45:55 +090041namespace.platform.asan.search.paths = /data/asan/system/${LIB}
42namespace.platform.asan.search.paths += /system/${LIB}
Martin Stjernholm92253752019-10-08 18:58:01 +010043
44# TODO(b/140790209): These directories are wrong in R and later because they
45# only contain Bionic internal libraries dependencies that should not be
46# accessed from the outside. However, they may be necessary for APEX builds that
47# are pushed to Q. Remove them as soon as Q compatibility is no longer required.
48namespace.platform.search.paths += /apex/com.android.runtime/${LIB}
Peter Collingbourne61f5fdf2019-04-25 23:27:18 -070049namespace.platform.asan.search.paths += /apex/com.android.runtime/${LIB}
Chong Zhang9bda4522019-02-27 13:43:50 -080050
Dongwon Kang82022c12019-03-18 11:53:26 -070051# /system/lib/libc.so, etc are symlinks to /apex/com.android.lib/lib/bionic/libc.so, etc.
Jiyong Parkc21e52b2019-03-09 17:26:48 +090052# Add /apex/... pat to the permitted paths because linker uses realpath(3)
Chong Zhang9bda4522019-02-27 13:43:50 -080053# to check the accessibility of the lib. We could add this to search.paths
54# instead but that makes the resolution of bionic libs be dependent on
Jiyong Parkc21e52b2019-03-09 17:26:48 +090055# the order of /system/lib and /apex/... in search.paths. If /apex/...
56# is after /system/lib, then /apex/... is never tried because libc.so
Chong Zhang9bda4522019-02-27 13:43:50 -080057# is always found in /system/lib but fails to pass the accessibility test
58# because of its realpath. It's better to not depend on the ordering if
59# possible.
Jiyong Parkc21e52b2019-03-09 17:26:48 +090060namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
61namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
Chong Zhang81468732019-04-02 10:15:38 -070062
63###############################################################################
64# "sphal" namespace
65#
66###############################################################################
67namespace.sphal.isolated = true
68namespace.sphal.visible = true
69
70# Keep the below in sync with "sphal" namespace in system's /etc/ld.config.txt
71# Codec2 has dependencies on some SP-hals (eg. android.hardware.graphics.mapper@2.0)
72# These are dlopen'ed by libvndksupport.so.
73namespace.sphal.search.paths = /odm/${LIB}
74namespace.sphal.search.paths += /vendor/${LIB}
75
76namespace.sphal.permitted.paths = /odm/${LIB}
77namespace.sphal.permitted.paths += /vendor/${LIB}
78namespace.sphal.permitted.paths += /vendor/${LIB}/hw
79namespace.sphal.permitted.paths += /system/vendor/${LIB}
80
81namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
82namespace.sphal.asan.search.paths += /odm/${LIB}
83namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
84namespace.sphal.asan.search.paths += /vendor/${LIB}
85
86namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
87namespace.sphal.asan.permitted.paths += /odm/${LIB}
88namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
89namespace.sphal.asan.permitted.paths += /vendor/${LIB}
90
91# Keep the below in sync with "vndk" namespace in system's /etc/ld.config.txt
92# System's sphal namespace links to vndk namespace for %VNDK_SAMEPROCESS_LIBRARIES%,
93# since we don't have a good way to auto-expand %VNDK_SAMEPROCESS_LIBRARIES%,
94# we'll add the vndk paths below.
95
96namespace.sphal.search.paths += /odm/${LIB}/vndk-sp
97namespace.sphal.search.paths += /vendor/${LIB}/vndk-sp
98namespace.sphal.search.paths += /system/${LIB}/vndk-sp${VNDK_VER}
99
100namespace.sphal.permitted.paths += /odm/${LIB}/hw
101namespace.sphal.permitted.paths += /odm/${LIB}/egl
102namespace.sphal.permitted.paths += /vendor/${LIB}/hw
103namespace.sphal.permitted.paths += /vendor/${LIB}/egl
104namespace.sphal.permitted.paths += /system/vendor/${LIB}/hw
105namespace.sphal.permitted.paths += /system/vendor/${LIB}/egl
106# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
107namespace.sphal.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw
108
109namespace.sphal.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
110namespace.sphal.asan.search.paths += /odm/${LIB}/vndk-sp
111namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
112namespace.sphal.asan.search.paths += /vendor/${LIB}/vndk-sp
113namespace.sphal.asan.search.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}
114namespace.sphal.asan.search.paths += /system/${LIB}/vndk-sp${VNDK_VER}
115
116namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/hw
117namespace.sphal.asan.permitted.paths += /odm/${LIB}/hw
118namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/egl
119namespace.sphal.asan.permitted.paths += /odm/${LIB}/egl
120namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
121namespace.sphal.asan.permitted.paths += /vendor/${LIB}/hw
122namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
123namespace.sphal.asan.permitted.paths += /vendor/${LIB}/egl
124
125namespace.sphal.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}/hw
126namespace.sphal.asan.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw
127
128# Once in this namespace, access to libraries in /system/lib is restricted. Only
129# libs listed here can be used.
130namespace.sphal.links = platform
131
132# TODO: replace the following when apex has a way to auto-generate this list
133# namespace.sphal.link.platform.shared_libs = %LLNDK_LIBRARIES%
134# namespace.sphal.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
135namespace.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
136
Daichi Hirono10f81be2019-09-19 12:33:59 +0900137# Allow to load VNDK-SP from /system/lib. Devices where VNDK is not enforced, do
138# not have vndk-sp directories.
139namespace.sphal.link.platform.shared_libs += libz.so:android.hardware.graphics.mapper@2.0.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libutils.so:libc++.so