From 3f5b5dc546c398db10dd9a5631070e2f09d33d0b Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Sun, 12 Feb 2017 21:07:04 -0800 Subject: [PATCH] Add comment to android_link_namespaces method Test: n/a - comment only change Bug: http://b/26833548 Change-Id: I40356eec37aeb864206982feb877c59c21c9a433 --- .../include/nativeloader/dlext_namespaces.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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);