1# Copyright (C) 2019 The Android Open Source Project 2# 3# Bionic loader config file for the Conscrypt APEX. 4 5dir.conscrypt = /apex/com.android.conscrypt/bin/ 6 7[conscrypt] 8additional.namespaces = platform 9 10# This configuration is only intended to support bin/boringssl_self_test{32,64} 11# loading libcrypto.so from the APEX. 12# 13# If there is a binary that needs the APEX exported library libjavacrypto.so 14# then this config should be replaced by the full namespace configs for the 15# "conscrypt" namespace in system/core/rootdir/etc/ld.config*.txt and its 16# dependencies "platform" and "runtime". 17 18namespace.default.search.paths = /apex/com.android.conscrypt/${LIB} 19namespace.default.asan.search.paths = /apex/com.android.conscrypt/${LIB} 20namespace.default.permitted.paths = /system/${LIB} 21namespace.default.asan.permitted.paths = /system/${LIB} 22namespace.default.links = platform 23namespace.default.link.platform.shared_libs = libc.so 24namespace.default.link.platform.shared_libs += libm.so 25namespace.default.link.platform.shared_libs += libdl.so 26namespace.default.link.platform.shared_libs += liblog.so 27namespace.default.link.platform.shared_libs += libclang_rt.hwasan-aarch64-android.so 28 29############################################################################### 30# "platform" namespace 31# 32# Corresponds to the default namespace in /system/etc/ld.config.txt, but 33# minimized to support the dependencies above. 34############################################################################### 35namespace.platform.isolated = true 36 37namespace.platform.search.paths = /system/${LIB} 38namespace.platform.asan.search.paths = /data/asan/system/${LIB} 39 40# /system/lib/libc.so, etc are symlinks to 41# /apex/com.android.runtime/lib/bionic/libc.so, etc. Add the path to the 42# permitted paths because linker uses realpath(3) to check the accessibility 43# of the lib. We could add this to search.paths instead but that makes the 44# resolution of bionic libs be dependent on the order of /system/lib and 45# /apex/.../lib/bionic in search.paths. If the latter is after the former, 46# then the latter is never tried because libc.so is always found in 47# /system/lib but fails to pass the accessibility test because of its realpath. 48# It's better to not depend on the ordering if possible. 49namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic 50namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic 51