summaryrefslogtreecommitdiffstats
path: root/libnativeloader/native_loader.cpp
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2017-02-03 14:11:27 -0800
committerDimitry Ivanov <dimitry@google.com>2017-02-06 14:26:56 -0800
commit26e1a846ef6b3bda9386fba405ea4485056b4e62 (patch)
tree5225cedcea6088846b7ebb1883079dd2b7122b31 /libnativeloader/native_loader.cpp
parente7005979c2ba01e13d75df218c0bc07ea71a479b (diff)
downloadsystem_core-26e1a846ef6b3bda9386fba405ea4485056b4e62.tar.gz
system_core-26e1a846ef6b3bda9386fba405ea4485056b4e62.tar.bz2
system_core-26e1a846ef6b3bda9386fba405ea4485056b4e62.zip
Replace public library list with shared lib sonames
Call updated interface in order to setup anonymous and classloader namespaces Bug: http://b/26833548 Test: build & boot angler Change-Id: I1fae5d9c015f2026563eb64d986c622c1b68effb
Diffstat (limited to 'libnativeloader/native_loader.cpp')
-rw-r--r--libnativeloader/native_loader.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp
index d7b5cb566..fca4c80fd 100644
--- a/libnativeloader/native_loader.cpp
+++ b/libnativeloader/native_loader.cpp
@@ -165,6 +165,11 @@ class LibraryNamespaces {
return false;
}
+ if (!android_link_namespaces(ns, nullptr, public_libraries_.c_str())) {
+ *error_msg = dlerror();
+ return false;
+ }
+
native_loader_ns = NativeLoaderNamespace(ns);
} else {
native_bridge_namespace_t* ns = NativeBridgeCreateNamespace("classloader-namespace",
@@ -308,8 +313,8 @@ class LibraryNamespaces {
// code is one example) unknown to linker in which case linker uses anonymous
// namespace. The second argument specifies the search path for the anonymous
// namespace which is the library_path of the classloader.
- initialized_ = android_init_namespaces(public_libraries_.c_str(),
- is_native_bridge ? nullptr : library_path);
+ initialized_ = android_init_anonymous_namespace(public_libraries_.c_str(),
+ is_native_bridge ? nullptr : library_path);
if (!initialized_) {
*error_msg = dlerror();
return false;