summaryrefslogtreecommitdiff
path: root/libnativeloader/native_loader.cpp
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2025-01-21 15:07:40 +0000
committer Martin Stjernholm <mast@google.com> 2025-01-28 00:46:55 -0800
commit162e2634caca054659a829df1040ee052b900c34 (patch)
tree864878bda454be5069a1f417597bf8ccfde2a43b /libnativeloader/native_loader.cpp
parentdaacc31423f8bcece99953d23661f0bffc91011f (diff)
Allow ART internal libs to load libs in NATIVELOADER_DEFAULT_NAMESPACE_LIBS.
This complements the treatment of NATIVELOADER_DEFAULT_NAMESPACE_LIBS, so that ART internal libs can load the libraries listed in that variable, as well as the other way around. This makes it possible to load libartagent(d).so without absolute paths in run tests on target, so use that to re-enable 900-hello-plugin. Test: art/test/testrunner/testrunner.py --target --64 900 in armv8 target chroot Test: art/test/testrunner/testrunner.py --host 900 Bug: 186654484 Change-Id: Ic418b26b2b77af8839af7b65ad44ea8b5121169c
Diffstat (limited to 'libnativeloader/native_loader.cpp')
-rw-r--r--libnativeloader/native_loader.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp
index f37f661a3e..964279446f 100644
--- a/libnativeloader/native_loader.cpp
+++ b/libnativeloader/native_loader.cpp
@@ -70,6 +70,11 @@ using ::android::nativeloader::LibraryNamespaces;
// the APEX. In that case the default namespace links to the ART namespace
// (com_android_art) for all libraries, which means this can be used to load
// test libraries that depend on ART internal libraries.
+//
+// There's also code in art/dalvikvm.cc to add links from com_android_art back
+// to the default namespace for NATIVELOADER_DEFAULT_NAMESPACE_LIBS, enabling
+// access in the opposite direction as well. Useful e.g. to load ART plugins in
+// NATIVELOADER_DEFAULT_NAMESPACE_LIBS.
constexpr const char* kNativeloaderExtraLibs = "nativeloader-extra-libs";
std::mutex g_namespaces_mutex;