2017-02-15 22:11:18 +00:00
|
|
|
# Copyright (C) 2017 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Bionic loader config file.
|
|
|
|
#
|
|
|
|
|
2017-12-12 13:11:47 +00:00
|
|
|
# Don't change the order here. The first pattern that matches with the
|
|
|
|
# absolute path of an executable is selected.
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
dir.system = /system/bin/
|
|
|
|
dir.system = /system/xbin/
|
2017-12-12 13:11:47 +00:00
|
|
|
|
2017-09-27 07:40:59 +00:00
|
|
|
dir.vendor = /odm/bin/
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
dir.vendor = /vendor/bin/
|
2017-09-27 07:40:59 +00:00
|
|
|
dir.vendor = /data/nativetest/odm
|
|
|
|
dir.vendor = /data/nativetest64/odm
|
|
|
|
dir.vendor = /data/benchmarktest/odm
|
|
|
|
dir.vendor = /data/benchmarktest64/odm
|
2017-09-28 20:04:00 +00:00
|
|
|
dir.vendor = /data/nativetest/vendor
|
|
|
|
dir.vendor = /data/nativetest64/vendor
|
|
|
|
dir.vendor = /data/benchmarktest/vendor
|
|
|
|
dir.vendor = /data/benchmarktest64/vendor
|
2017-12-12 13:11:47 +00:00
|
|
|
|
2017-09-28 20:04:00 +00:00
|
|
|
dir.system = /data/nativetest
|
|
|
|
dir.system = /data/nativetest64
|
|
|
|
dir.system = /data/benchmarktest
|
|
|
|
dir.system = /data/benchmarktest64
|
2017-02-15 22:11:18 +00:00
|
|
|
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
[system]
|
|
|
|
additional.namespaces = sphal,vndk,rs
|
2017-02-15 22:11:18 +00:00
|
|
|
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
###############################################################################
|
|
|
|
# "default" namespace
|
2017-02-15 22:11:18 +00:00
|
|
|
#
|
2017-12-12 13:11:47 +00:00
|
|
|
# Framework-side code runs in this namespace. However, libs from other
|
|
|
|
# partitions are also allowed temporarily.
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
###############################################################################
|
|
|
|
namespace.default.isolated = false
|
2017-12-12 13:11:47 +00:00
|
|
|
|
|
|
|
namespace.default.search.paths = /system/${LIB}
|
|
|
|
namespace.default.search.paths += /odm/${LIB}
|
|
|
|
namespace.default.search.paths += /vendor/${LIB}
|
|
|
|
|
|
|
|
namespace.default.asan.search.paths = /data/asan/system/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /system/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /data/asan/odm/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /odm/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /vendor/${LIB}
|
2017-02-15 22:11:18 +00:00
|
|
|
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
###############################################################################
|
|
|
|
# "sphal" namespace
|
|
|
|
#
|
|
|
|
# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
|
|
|
|
# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
|
|
|
|
# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
|
|
|
|
#
|
|
|
|
# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
|
|
|
|
# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
|
|
|
|
# that they should be searched and loaded from this namespace.
|
|
|
|
#
|
|
|
|
# Note that there is no link from the default namespace to this namespace.
|
|
|
|
###############################################################################
|
|
|
|
namespace.sphal.isolated = true
|
|
|
|
namespace.sphal.visible = true
|
2017-02-15 22:11:18 +00:00
|
|
|
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.sphal.search.paths = /odm/${LIB}
|
|
|
|
namespace.sphal.search.paths += /vendor/${LIB}
|
|
|
|
|
|
|
|
namespace.sphal.permitted.paths = /odm/${LIB}
|
|
|
|
namespace.sphal.permitted.paths += /vendor/${LIB}
|
|
|
|
|
|
|
|
namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
|
|
|
|
namespace.sphal.asan.search.paths += /odm/${LIB}
|
|
|
|
namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
|
|
|
|
namespace.sphal.asan.search.paths += /vendor/${LIB}
|
|
|
|
|
|
|
|
namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
|
|
|
|
namespace.sphal.asan.permitted.paths += /odm/${LIB}
|
|
|
|
namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
|
|
|
|
namespace.sphal.asan.permitted.paths += /vendor/${LIB}
|
2017-04-22 00:18:45 +00:00
|
|
|
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
# Once in this namespace, access to libraries in /system/lib is restricted. Only
|
|
|
|
# libs listed here can be used.
|
2017-04-21 06:16:12 +00:00
|
|
|
namespace.sphal.links = default,vndk,rs
|
2017-02-15 22:11:18 +00:00
|
|
|
|
2018-02-02 04:22:02 +00:00
|
|
|
namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%
|
|
|
|
namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
|
|
|
|
|
|
|
|
namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
|
2017-04-21 06:16:12 +00:00
|
|
|
|
|
|
|
# Renderscript gets separate namespace
|
|
|
|
namespace.sphal.link.rs.shared_libs = libRS_internal.so
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# "rs" namespace
|
|
|
|
#
|
|
|
|
# This namespace is exclusively for Renderscript internal libraries.
|
|
|
|
# This namespace has slightly looser restriction than the vndk namespace because
|
|
|
|
# of the genuine characteristics of Renderscript; /data is in the permitted path
|
|
|
|
# to load the compiled *.so file and libmediandk.so can be used here.
|
|
|
|
###############################################################################
|
|
|
|
namespace.rs.isolated = true
|
2017-08-16 14:32:54 +00:00
|
|
|
namespace.rs.visible = true
|
2017-04-21 06:16:12 +00:00
|
|
|
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.rs.search.paths = /odm/${LIB}/vndk-sp
|
|
|
|
namespace.rs.search.paths += /vendor/${LIB}/vndk-sp
|
2018-01-16 02:46:21 +00:00
|
|
|
namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.rs.search.paths += /odm/${LIB}
|
|
|
|
namespace.rs.search.paths += /vendor/${LIB}
|
|
|
|
|
|
|
|
namespace.rs.permitted.paths = /odm/${LIB}
|
|
|
|
namespace.rs.permitted.paths += /vendor/${LIB}
|
|
|
|
namespace.rs.permitted.paths += /data
|
|
|
|
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
|
|
|
|
namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp
|
|
|
|
namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
|
|
|
|
namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp
|
2018-01-16 02:46:21 +00:00
|
|
|
namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
|
|
|
|
namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.rs.asan.search.paths += /data/asan/odm/${LIB}
|
|
|
|
namespace.rs.asan.search.paths += /odm/${LIB}
|
|
|
|
namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}
|
|
|
|
namespace.rs.asan.search.paths += /vendor/${LIB}
|
|
|
|
|
|
|
|
namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB}
|
|
|
|
namespace.rs.asan.permitted.paths += /odm/${LIB}
|
|
|
|
namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB}
|
|
|
|
namespace.rs.asan.permitted.paths += /vendor/${LIB}
|
|
|
|
namespace.rs.asan.permitted.paths += /data
|
2017-05-09 06:07:43 +00:00
|
|
|
|
2017-04-21 06:16:12 +00:00
|
|
|
namespace.rs.links = default,vndk
|
2017-12-12 13:11:47 +00:00
|
|
|
|
2018-02-02 04:22:02 +00:00
|
|
|
namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%
|
|
|
|
namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
|
|
|
|
# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this
|
|
|
|
# namespace because RS framework libs are using them.
|
|
|
|
namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES%
|
|
|
|
|
|
|
|
namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
|
2017-02-15 22:11:18 +00:00
|
|
|
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
###############################################################################
|
|
|
|
# "vndk" namespace
|
|
|
|
#
|
|
|
|
# This namespace is exclusively for vndk-sp libs.
|
|
|
|
###############################################################################
|
|
|
|
namespace.vndk.isolated = true
|
2017-09-25 16:38:22 +00:00
|
|
|
namespace.vndk.visible = true
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.vndk.search.paths = /odm/${LIB}/vndk-sp
|
|
|
|
namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
|
2018-01-16 02:46:21 +00:00
|
|
|
namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
|
2017-12-12 13:11:47 +00:00
|
|
|
|
|
|
|
namespace.vndk.permitted.paths = /odm/${LIB}/hw
|
|
|
|
namespace.vndk.permitted.paths += /odm/${LIB}/egl
|
|
|
|
namespace.vndk.permitted.paths += /vendor/${LIB}/hw
|
|
|
|
namespace.vndk.permitted.paths += /vendor/${LIB}/egl
|
2018-02-02 04:22:02 +00:00
|
|
|
# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
|
|
|
|
namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
|
2017-12-12 13:11:47 +00:00
|
|
|
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
|
|
|
|
namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
|
|
|
|
namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
|
|
|
|
namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
|
2018-01-16 02:46:21 +00:00
|
|
|
namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
|
|
|
|
namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
|
2017-12-12 13:11:47 +00:00
|
|
|
|
|
|
|
namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw
|
|
|
|
namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw
|
|
|
|
namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl
|
|
|
|
namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl
|
|
|
|
namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
|
|
|
|
namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw
|
|
|
|
namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
|
|
|
|
namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl
|
2017-04-22 00:18:45 +00:00
|
|
|
|
2018-02-02 04:22:02 +00:00
|
|
|
namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw
|
|
|
|
namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
|
|
|
|
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
# When these NDK libs are required inside this namespace, then it is redirected
|
|
|
|
# to the default namespace. This is possible since their ABI is stable across
|
|
|
|
# Android releases.
|
|
|
|
namespace.vndk.links = default
|
2018-02-02 04:22:02 +00:00
|
|
|
namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%
|
|
|
|
namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
|
2017-02-15 22:11:18 +00:00
|
|
|
|
2017-07-20 06:17:35 +00:00
|
|
|
###############################################################################
|
|
|
|
# Namespace config for vendor processes. In O, no restriction is enforced for
|
|
|
|
# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
|
|
|
|
# the default namespace. 'system' namespace will be added to give limited
|
|
|
|
# (LL-NDK only) access.
|
|
|
|
###############################################################################
|
Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.
default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).
sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().
vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.
Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.
Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.
Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')
Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-05 05:24:14 +00:00
|
|
|
[vendor]
|
|
|
|
namespace.default.isolated = false
|
2017-04-22 00:18:45 +00:00
|
|
|
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.default.search.paths = /odm/${LIB}
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.default.search.paths += /odm/${LIB}/vndk
|
|
|
|
namespace.default.search.paths += /odm/${LIB}/vndk-sp
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.default.search.paths += /vendor/${LIB}
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.default.search.paths += /vendor/${LIB}/vndk
|
|
|
|
namespace.default.search.paths += /vendor/${LIB}/vndk-sp
|
2017-12-12 13:11:47 +00:00
|
|
|
|
|
|
|
# Access to system libraries are allowed
|
2018-01-16 02:46:21 +00:00
|
|
|
namespace.default.search.paths += /system/${LIB}/vndk%VNDK_VER%
|
|
|
|
namespace.default.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.default.search.paths += /system/${LIB}
|
|
|
|
|
2017-12-19 02:38:45 +00:00
|
|
|
namespace.default.asan.search.paths = /data/asan/odm/${LIB}
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.default.asan.search.paths += /odm/${LIB}
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.default.asan.search.paths += /data/asan/odm/${LIB}/vndk
|
|
|
|
namespace.default.asan.search.paths += /odm/${LIB}/vndk
|
|
|
|
namespace.default.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
|
|
|
|
namespace.default.asan.search.paths += /odm/${LIB}/vndk-sp
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /vendor/${LIB}
|
2017-12-13 07:59:21 +00:00
|
|
|
namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/vndk
|
|
|
|
namespace.default.asan.search.paths += /vendor/${LIB}/vndk
|
|
|
|
namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
|
|
|
|
namespace.default.asan.search.paths += /vendor/${LIB}/vndk-sp
|
2018-01-16 02:46:21 +00:00
|
|
|
namespace.default.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER%
|
|
|
|
namespace.default.asan.search.paths += /system/${LIB}/vndk%VNDK_VER%
|
|
|
|
namespace.default.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
|
|
|
|
namespace.default.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
|
2017-12-12 13:11:47 +00:00
|
|
|
namespace.default.asan.search.paths += /data/asan/system/${LIB}
|
|
|
|
namespace.default.asan.search.paths += /system/${LIB}
|