Merge "Do not add duplicate soinfos to g_default_namespace"

This commit is contained in:
Ryan Prichard 2020-01-07 20:18:14 +00:00 committed by Gerrit Code Review
commit cec75e3303
1 changed files with 6 additions and 4 deletions

View File

@ -4202,11 +4202,13 @@ std::vector<android_namespace_t*> init_default_namespaces(const char* executable
// we also need vdso to be available for all namespaces (if present) // we also need vdso to be available for all namespaces (if present)
soinfo* vdso = solist_get_vdso(); soinfo* vdso = solist_get_vdso();
for (auto it : namespaces) { for (auto it : namespaces) {
it.second->add_soinfo(ld_android_so); if (it.second != &g_default_namespace) {
if (vdso != nullptr) { it.second->add_soinfo(ld_android_so);
it.second->add_soinfo(vdso); if (vdso != nullptr) {
it.second->add_soinfo(vdso);
}
// somain and ld_preloads are added to these namespaces after LD_PRELOAD libs are linked
} }
// somain and ld_preloads are added to these namespaces after LD_PRELOAD libs are linked
} }
set_application_target_sdk_version(config->target_sdk_version()); set_application_target_sdk_version(config->target_sdk_version());