blob: b6896f5e1e8528a1fe189abc9f04a186a96adf76 [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%
Yifan Hong034e53e2019-03-29 13:10:53 -070030namespace.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: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
40namespace.platform.search.paths = /system/${LIB}
41namespace.platform.asan.search.paths = /data/asan/system/${LIB}
42
Dongwon Kang82022c12019-03-18 11:53:26 -070043# /system/lib/libc.so, etc are symlinks to /apex/com.android.lib/lib/bionic/libc.so, etc.
Jiyong Parkc21e52b2019-03-09 17:26:48 +090044# Add /apex/... pat to the permitted paths because linker uses realpath(3)
Chong Zhang9bda4522019-02-27 13:43:50 -080045# to check the accessibility of the lib. We could add this to search.paths
46# instead but that makes the resolution of bionic libs be dependent on
Jiyong Parkc21e52b2019-03-09 17:26:48 +090047# the order of /system/lib and /apex/... in search.paths. If /apex/...
48# is after /system/lib, then /apex/... is never tried because libc.so
Chong Zhang9bda4522019-02-27 13:43:50 -080049# is always found in /system/lib but fails to pass the accessibility test
50# because of its realpath. It's better to not depend on the ordering if
51# possible.
Jiyong Parkc21e52b2019-03-09 17:26:48 +090052namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
53namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
Chong Zhang81468732019-04-02 10:15:38 -070054
55###############################################################################
56# "sphal" namespace
57#
58###############################################################################
59namespace.sphal.isolated = true
60namespace.sphal.visible = true
61
62# Keep the below in sync with "sphal" namespace in system's /etc/ld.config.txt
63# Codec2 has dependencies on some SP-hals (eg. android.hardware.graphics.mapper@2.0)
64# These are dlopen'ed by libvndksupport.so.
65namespace.sphal.search.paths = /odm/${LIB}
66namespace.sphal.search.paths += /vendor/${LIB}
67
68namespace.sphal.permitted.paths = /odm/${LIB}
69namespace.sphal.permitted.paths += /vendor/${LIB}
70namespace.sphal.permitted.paths += /vendor/${LIB}/hw
71namespace.sphal.permitted.paths += /system/vendor/${LIB}
72
73namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
74namespace.sphal.asan.search.paths += /odm/${LIB}
75namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
76namespace.sphal.asan.search.paths += /vendor/${LIB}
77
78namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
79namespace.sphal.asan.permitted.paths += /odm/${LIB}
80namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
81namespace.sphal.asan.permitted.paths += /vendor/${LIB}
82
83# Keep the below in sync with "vndk" namespace in system's /etc/ld.config.txt
84# System's sphal namespace links to vndk namespace for %VNDK_SAMEPROCESS_LIBRARIES%,
85# since we don't have a good way to auto-expand %VNDK_SAMEPROCESS_LIBRARIES%,
86# we'll add the vndk paths below.
87
88namespace.sphal.search.paths += /odm/${LIB}/vndk-sp
89namespace.sphal.search.paths += /vendor/${LIB}/vndk-sp
90namespace.sphal.search.paths += /system/${LIB}/vndk-sp${VNDK_VER}
91
92namespace.sphal.permitted.paths += /odm/${LIB}/hw
93namespace.sphal.permitted.paths += /odm/${LIB}/egl
94namespace.sphal.permitted.paths += /vendor/${LIB}/hw
95namespace.sphal.permitted.paths += /vendor/${LIB}/egl
96namespace.sphal.permitted.paths += /system/vendor/${LIB}/hw
97namespace.sphal.permitted.paths += /system/vendor/${LIB}/egl
98# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
99namespace.sphal.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw
100
101namespace.sphal.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
102namespace.sphal.asan.search.paths += /odm/${LIB}/vndk-sp
103namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
104namespace.sphal.asan.search.paths += /vendor/${LIB}/vndk-sp
105namespace.sphal.asan.search.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}
106namespace.sphal.asan.search.paths += /system/${LIB}/vndk-sp${VNDK_VER}
107
108namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/hw
109namespace.sphal.asan.permitted.paths += /odm/${LIB}/hw
110namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/egl
111namespace.sphal.asan.permitted.paths += /odm/${LIB}/egl
112namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
113namespace.sphal.asan.permitted.paths += /vendor/${LIB}/hw
114namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
115namespace.sphal.asan.permitted.paths += /vendor/${LIB}/egl
116
117namespace.sphal.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}/hw
118namespace.sphal.asan.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw
119
120# Once in this namespace, access to libraries in /system/lib is restricted. Only
121# libs listed here can be used.
122namespace.sphal.links = platform
123
124# TODO: replace the following when apex has a way to auto-generate this list
125# namespace.sphal.link.platform.shared_libs = %LLNDK_LIBRARIES%
126# namespace.sphal.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
127namespace.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
128