From 2207b7e7db463dfa96d071654c49268e22e8745f Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Wed, 28 Apr 2021 14:52:01 +0100 Subject: Extend Link() to allow linking to the default namespace. The code path through native bridge and NDK translation should propagate nullptr as well. This to support a later change that changes the way native test libraries are loaded in ART run tests. Test: art/test/testrunner/testrunner.py --target --64 --optimizing Bug: 130340935 Change-Id: I934d11942e41ccc6d140a7044faa160b006166f1 --- libnativeloader/native_loader_namespace.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libnativeloader/native_loader_namespace.h') diff --git a/libnativeloader/native_loader_namespace.h b/libnativeloader/native_loader_namespace.h index f6a324be56..9a5aeac203 100644 --- a/libnativeloader/native_loader_namespace.h +++ b/libnativeloader/native_loader_namespace.h @@ -55,7 +55,11 @@ struct NativeLoaderNamespace { std::string name() const { return name_; } bool IsBridged() const { return raw_.index() == 1; } - Result Link(const NativeLoaderNamespace& target, const std::string& shared_libs) const; + // Creates a link from this namespace to target for the ":"-separated list of + // libraries in shared_libs. If target is nullptr it creates a link to the + // default namespace. + Result Link(const NativeLoaderNamespace* target, const std::string& shared_libs) const; + Result Load(const char* lib_name) const; static Result GetExportedNamespace(const std::string& name, -- cgit v1.2.3-59-g8ed1b