blob: 25c8a650e97afb0e9640a5a5844c8aacff18eb67 [file] [log] [blame]
Martin Stjernholm799ad142018-12-19 20:37:27 +00001# 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
8dir.runtime = /apex/com.android.runtime/bin/
9
10[runtime]
Nicolas Geoffray584bebe2019-01-26 01:07:35 +000011additional.namespaces = platform,conscrypt,runtime
Martin Stjernholm799ad142018-12-19 20:37:27 +000012
Martin Stjernholm916b4262019-04-29 20:57:27 +000013# Keep in sync with the runtime namespace in /system/etc/ld.config.txt.
Martin Stjernholm799ad142018-12-19 20:37:27 +000014namespace.default.isolated = true
Martin Stjernholm916b4262019-04-29 20:57:27 +000015# Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by
16# libart.
17namespace.default.visible = true
18namespace.default.search.paths = /apex/com.android.runtime/${LIB}
19namespace.default.asan.search.paths = /apex/com.android.runtime/${LIB}
Martin Stjernholm799ad142018-12-19 20:37:27 +000020# odex files are in /system/framework. dalvikvm has to be able to dlopen the
21# files for CTS.
Martin Stjernholm916b4262019-04-29 20:57:27 +000022namespace.default.permitted.paths = /system/framework
23namespace.default.links = platform
Martin Stjernholma4469ef2019-02-27 21:04:24 +000024# Need allow_all_shared_libs because libart.so can dlopen oat files in
25# /system/framework and /data.
26# TODO(b/130340935): Use a dynamically created linker namespace similar to
27# classloader-namespace for oat files, and tighten this up.
Martin Stjernholm916b4262019-04-29 20:57:27 +000028namespace.default.link.platform.allow_all_shared_libs = true
Martin Stjernholm799ad142018-12-19 20:37:27 +000029
Martin Stjernholm916b4262019-04-29 20:57:27 +000030# Keep in sync with the default namespace in /system/etc/ld.config.txt.
Martin Stjernholm799ad142018-12-19 20:37:27 +000031namespace.platform.isolated = true
32namespace.platform.search.paths = /system/${LIB}
Jiyong Parkf8d8eb92019-01-24 15:06:21 +090033namespace.platform.asan.search.paths = /data/asan/system/${LIB}
Martin Stjernholm916b4262019-04-29 20:57:27 +000034namespace.platform.links = default
Martin Stjernholm356864a2019-04-30 16:22:17 +010035namespace.platform.link.default.shared_libs = libandroidicu.so
36namespace.platform.link.default.shared_libs += libdexfile_external.so
37namespace.platform.link.default.shared_libs += libdexfiled_external.so
Martin Stjernholm916b4262019-04-29 20:57:27 +000038namespace.platform.link.default.shared_libs += libnativebridge.so
39namespace.platform.link.default.shared_libs += libnativehelper.so
40namespace.platform.link.default.shared_libs += libnativeloader.so
Victor Chang2f0008a2019-01-15 14:10:34 +000041
42# TODO(b/122876336): Remove libpac.so once it's migrated to Webview
Martin Stjernholm916b4262019-04-29 20:57:27 +000043namespace.platform.link.default.shared_libs += libpac.so
Victor Chang2f0008a2019-01-15 14:10:34 +000044
Jiyong Park94b6c342019-03-07 14:58:34 +090045# /system/lib/libc.so, etc are symlinks to
46# /apex/com.android.runtime/lib/bionic/libc.so, etc. Add the path to the
47# permitted paths because linker uses realpath(3) to check the accessibility
48# of the lib. We could add this to search.paths instead but that makes the
49# resolution of bionic libs be dependent on the order of /system/lib and
50# /apex/.../lib/bionic in search.paths. If the latter is after the former,
51# then the latter is never tried because libc.so is always found in
52# /system/lib but fails to pass the accessibility test because of its realpath.
53# It's better to not depend on the ordering if possible.
54namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
55namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
Nicolas Geoffray37498de2019-01-22 08:46:34 +000056
Martin Stjernholm916b4262019-04-29 20:57:27 +000057# Note that we don't need to link the default namespace with conscrypt:
Nicolas Geoffray0299fad2019-01-22 14:50:29 +000058# the runtime Java code and binaries do not explicitly load native libraries
59# from it.
60
Nicolas Geoffray37498de2019-01-22 08:46:34 +000061###############################################################################
62# "conscrypt" APEX namespace
63#
64# This namespace is for libraries within the conscrypt APEX.
65###############################################################################
Nicolas Geoffray0299fad2019-01-22 14:50:29 +000066
Martin Stjernholm916b4262019-04-29 20:57:27 +000067# Keep in sync with conscrypt namespace in /system/etc/ld.config.txt.
Nicolas Geoffray37498de2019-01-22 08:46:34 +000068namespace.conscrypt.isolated = true
69namespace.conscrypt.visible = true
70
71namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB}
Jiyong Parkf8d8eb92019-01-24 15:06:21 +090072namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB}
Pete Bentleydc3d5872019-01-31 11:06:00 +000073namespace.conscrypt.links = runtime,platform
Pete Bentley79f56622019-03-21 17:09:56 +000074namespace.conscrypt.link.runtime.shared_libs = libandroidio.so
Nicolas Geoffray37498de2019-01-22 08:46:34 +000075namespace.conscrypt.link.platform.shared_libs = libc.so
76namespace.conscrypt.link.platform.shared_libs += libm.so
77namespace.conscrypt.link.platform.shared_libs += libdl.so
Tom Cherry6686f3c2019-02-19 10:47:10 -080078namespace.conscrypt.link.platform.shared_libs += liblog.so
Martin Stjernholm916b4262019-04-29 20:57:27 +000079
80###############################################################################
81# "runtime" APEX namespace
82#
83# This namespace is an alias for the default namespace.
84###############################################################################
85namespace.runtime.isolated = true
86namespace.runtime.visible = true
87namespace.runtime.links = default
88namespace.runtime.link.default.allow_all_shared_libs = true
89namespace.runtime.links += platform
90# TODO(b/119867084): Restrict fallback to platform namespace to PALette library.
91namespace.runtime.link.platform.allow_all_shared_libs = true