Merge "Add ld.config.txt for Android 8.x+ trees" into android-9.0
diff --git a/etc/Android.mk b/etc/Android.mk
index 4aeb251..ca549ea 100644
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -60,6 +60,15 @@
LOCAL_SRC_FILES := init.recovery.hlthchrg26.rc
include $(BUILD_PREBUILT)
+
+ include $(CLEAR_VARS)
+ LOCAL_MODULE := init.recovery.ldconfig.rc
+ LOCAL_MODULE_TAGS := eng
+ LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+
+ LOCAL_SRC_FILES := init.recovery.ldconfig.rc
+ include $(BUILD_PREBUILT)
else
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.hlthchrg.rc
diff --git a/etc/init.rc b/etc/init.rc
index 348471d..e0889c4 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -1,4 +1,5 @@
import /init.recovery.logd.rc
+import /init.recovery.ldconfig.rc
import /init.recovery.mksh.rc
import /init.recovery.usb.rc
import /init.recovery.service.rc
diff --git a/etc/init.recovery.ldconfig.rc b/etc/init.recovery.ldconfig.rc
new file mode 100755
index 0000000..ad9c296
--- /dev/null
+++ b/etc/init.recovery.ldconfig.rc
@@ -0,0 +1,2 @@
+on fs
+ export LD_CONFIG_FILE /sbin/ld.config.txt
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index d330799..4640d03 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -370,6 +370,7 @@
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libvintf.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtinyxml2.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.token@1.0.so
+ RELINK_SOURCE_FILES += $(TARGET_OUT_ETC)/ld.config.txt
ifneq ($(wildcard system/core/libkeyutils/Android.bp),)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeyutils.so
endif