diff options
author | Ryan Prichard <rprichard@google.com> | 2020-01-07 20:18:14 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-01-07 20:18:14 +0000 |
commit | cec75e330326414d3d0e823cc6354d56194c07ab (patch) | |
tree | 521131ead42063e7c4a221f0e0e8865adb3776b5 /linker/linker.cpp | |
parent | 094b33fbf06612fbf09fa0ae349d0a6abaf1204b (diff) | |
parent | e2871bd0d88f94a729550b428c0551fbc952a04e (diff) |
Merge "Do not add duplicate soinfos to g_default_namespace"
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 54e0703c7..8b0520ae8 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -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) soinfo* vdso = solist_get_vdso(); for (auto it : namespaces) { - it.second->add_soinfo(ld_android_so); - if (vdso != nullptr) { - it.second->add_soinfo(vdso); + if (it.second != &g_default_namespace) { + it.second->add_soinfo(ld_android_so); + 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()); |