diff options
author | Jooyung Han <jooyung@google.com> | 2020-05-27 19:38:37 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2020-05-29 09:50:15 +0900 |
commit | 35ab6db3f5c8ffc60c035ea840f517ed9305545b (patch) | |
tree | b0cb8930c32dca94c4f6a2bb67d18f0323c312eb | |
parent | 2e13598eb90b7953c61205dc2e6b665ce15c661a (diff) | |
download | linkerconfig-35ab6db3f5c8ffc60c035ea840f517ed9305545b.tar.gz |
Add system stubs as "provided" from vendor default
For VNDK-lite devices, the default namespace of the vendor section works
like the default namespace of the system section.
So, provides/requires should be same as the system.default NS.
Bug: 153412158
Test: rundiff.sh
check if vendor.com_android_os_statsd namespace has access to
libbinder_ndk.so from vendor.default namespace
Merged-In: I1d68e12b34e360eb34edeb5155982b545c89c2f4
Change-Id: I1d68e12b34e360eb34edeb5155982b545c89c2f4
(cherry picked from commit 50371b2bf332a26b4f42191e0869a558db9d3222)
-rw-r--r-- | contents/namespace/vendordefault.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contents/namespace/vendordefault.cc b/contents/namespace/vendordefault.cc index eefd0b4..6d56904 100644 --- a/contents/namespace/vendordefault.cc +++ b/contents/namespace/vendordefault.cc @@ -17,9 +17,11 @@ // This is the default linker namespace for a vendor process (a process started // from /vendor/bin/*). -#include "linkerconfig/environment.h" #include "linkerconfig/namespacebuilder.h" +#include "linkerconfig/common.h" +#include "linkerconfig/environment.h" + using android::linkerconfig::modules::AsanPath; using android::linkerconfig::modules::GetVendorVndkVersion; using android::linkerconfig::modules::Namespace; @@ -100,7 +102,10 @@ Namespace BuildVendorDefaultNamespace([[maybe_unused]] const Context& ctx) { ns.AddPermittedPath("/system/vendor", AsanPath::NONE); if (is_vndklite) { + // Because vendor-default NS works like system-default NS for VNDK-lite + // devices the requires/provides are added just like system-default. ns.AddRequires(kVndkLiteVendorRequires); + ns.AddProvides(GetSystemStubLibraries()); } else { ns.GetLink(ctx.GetSystemNamespaceName()) .AddSharedLib( |