summaryrefslogtreecommitdiffstats
path: root/libnativeloader/include/nativeloader
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2017-02-12 21:07:04 -0800
committerDimitry Ivanov <dimitry@google.com>2017-02-13 08:52:35 -0800
commit3f5b5dc546c398db10dd9a5631070e2f09d33d0b (patch)
treef96a930294ec807e6c9c515f97506dd4ff135670 /libnativeloader/include/nativeloader
parentfd87c062abb0c1600e068f477699530e9c6758ed (diff)
downloadsystem_core-3f5b5dc546c398db10dd9a5631070e2f09d33d0b.tar.gz
system_core-3f5b5dc546c398db10dd9a5631070e2f09d33d0b.tar.bz2
system_core-3f5b5dc546c398db10dd9a5631070e2f09d33d0b.zip
Add comment to android_link_namespaces method
Test: n/a - comment only change Bug: http://b/26833548 Change-Id: I40356eec37aeb864206982feb877c59c21c9a433
Diffstat (limited to 'libnativeloader/include/nativeloader')
-rw-r--r--libnativeloader/include/nativeloader/dlext_namespaces.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libnativeloader/include/nativeloader/dlext_namespaces.h b/libnativeloader/include/nativeloader/dlext_namespaces.h
index 73d0be8f7..ac64f710a 100644
--- a/libnativeloader/include/nativeloader/dlext_namespaces.h
+++ b/libnativeloader/include/nativeloader/dlext_namespaces.h
@@ -85,6 +85,22 @@ extern struct android_namespace_t* android_create_namespace(const char* name,
const char* permitted_when_isolated_path,
android_namespace_t* parent);
+/*
+ * Creates a link between namespaces. Every link has list of sonames of
+ * shared libraries. These are the libraries which are accessible from
+ * namespace 'from' but loaded within namespace 'to' context.
+ * When to namespace is nullptr this function establishes a link between
+ * 'from' namespace and the default namespace.
+ *
+ * The lookup order of the libraries in namespaces with links is following:
+ * 1. Look inside current namespace using 'this' namespace search path.
+ * 2. Look in linked namespaces
+ * 2.1. Perform soname check - if library soname is not in the list of shared
+ * libraries sonames skip this link, otherwise
+ * 2.2. Search library using linked namespace search path. Note that this
+ * step will not go deeper into linked namespaces for this library but
+ * will do so for DT_NEEDED libraries.
+ */
extern bool android_link_namespaces(android_namespace_t* from,
android_namespace_t* to,
const char* shared_libs_sonames);