Revert^2 "Linker namespace configuration for the Runtime APEX."

This reverts commit 5bbd9b99f443ac7cf87d444d30847a358e436602.

Original change: This mimics the namespace configuration in
system/core/rootdir/etc/ld.config.txt so that the same namespace separation
between APEX and /system libraries is kept. The "default" namespace here
corresponds to "runtime" in the system config, and "platform" here
corresponds to "default" there.

Bug: 119867084
Bug: 113373927
Bug: 121149887
Change-Id: I9737a3c9425cfb5115091070ebf937b7c82142c7
Test: Flash and reboot device
Test: Run "/apex/com.android.runtime/bin/dex2oat -h" and check that libraries are loaded from right locations
Test: Run "adb shell cmd package compile -m speed-profile -f -a" with aosp/848510 to pick dex2oat in the APEX
Test: cts-tradefed run commandAndExit cts-dev -m CtsJniTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsCompilationTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsBionicTestCases (8 failures remain unchanged by this CL)
diff --git a/build/apex/ld.config.txt b/build/apex/ld.config.txt
index ac4d1eb..69e6543 100644
--- a/build/apex/ld.config.txt
+++ b/build/apex/ld.config.txt
@@ -1 +1,27 @@
-# TODO: Write me.
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Bionic loader config file for the Runtime APEX.
+#
+# There are no versioned APEX paths here - this APEX module does not support
+# having several versions mounted.
+
+dir.runtime = /apex/com.android.runtime/bin/
+
+[runtime]
+additional.namespaces = platform
+
+# Keep in sync with runtime namespace in /system/etc/ld.config.txt.
+namespace.default.isolated = true
+namespace.default.search.paths = /apex/com.android.runtime/${LIB}
+# odex files are in /system/framework. dalvikvm has to be able to dlopen the
+# files for CTS.
+namespace.default.permitted.paths = /system/framework
+namespace.default.links = platform
+# TODO(b/119867084): Restrict fallback to platform namespace to PALette library.
+namespace.default.link.platform.allow_all_shared_libs = true
+
+# Keep in sync with default namespace in /system/etc/ld.config.txt.
+namespace.platform.isolated = true
+namespace.platform.search.paths = /system/${LIB}
+namespace.platform.links = default
+namespace.platform.link.default.shared_libs = libc.so:libdl.so:libm.so