diff options
author | Martin Stjernholm <mast@google.com> | 2019-02-06 21:47:26 +0000 |
---|---|---|
committer | Martin Stjernholm <mast@google.com> | 2019-02-06 21:51:27 +0000 |
commit | b78f6ec7ef85962a62bca611819fca8c61bb8f32 (patch) | |
tree | 29231c4f9c6b536c2a23218eaec1bb4593cda15a /libnativeloader/native_loader.cpp | |
parent | a13b119c3d8db20233d92d6c5fa8f00eb16ae516 (diff) |
Add some overview docs for classloader-namespace.
Courtesy of jiyong@.
Test: n/a
Change-Id: I4ee239c63a5b5f90516b05af25b32ff22b147d53
Diffstat (limited to 'libnativeloader/native_loader.cpp')
-rw-r--r-- | libnativeloader/native_loader.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp index a4e00bd0b..5394d7eae 100644 --- a/libnativeloader/native_loader.cpp +++ b/libnativeloader/native_loader.cpp @@ -118,7 +118,16 @@ static constexpr const char* kVndkNamespaceName = "vndk"; static constexpr const char* kRuntimeNamespaceName = "runtime"; +// classloader-namespace is a linker namespace that is created for the loaded +// app. To be specific, it is created for the app classloader. When +// System.load() is called from a Java class that is loaded from the +// classloader, the classloader-namespace namespace associated with that +// classloader is selected for dlopen. The namespace is configured so that its +// search path is set to the app-local JNI directory and it is linked to the +// default namespace with the names of libs listed in the public.libraries.txt. +// This way an app can only load its own JNI libraries along with the public libs. static constexpr const char* kClassloaderNamespaceName = "classloader-namespace"; +// Same thing for vendor APKs. static constexpr const char* kVendorClassloaderNamespaceName = "vendor-classloader-namespace"; // (http://b/27588281) This is a workaround for apps using custom classloaders and calling |