aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2017-05-16 22:08:52 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-16 22:08:52 +0000
commit3a644889b24edf5efe53d7b333e24009269601ed (patch)
tree82245c6efb48c73e9498b05aff95ecb3e212e402
parentbe8327ce716c433988053589c778601a33ddfdad (diff)
parentb37d10cc8017c102530c096537890b7c6215ad2b (diff)
downloadbionic-3a644889b24edf5efe53d7b333e24009269601ed.tar.gz
linker: remove link from external library on unload
am: b37d10cc80 Change-Id: I48901a8fbf4bc25fff1462e6086fc23b76ca2ba3
-rw-r--r--linker/linker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 8b28d7537..0ab8bd2d1 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -2246,6 +2246,9 @@ static void soinfo_unload(soinfo* soinfos[], size_t count) {
if (local_unload_list.contains(child)) {
continue;
} else if (child->is_linked() && child->get_local_group_root() != root) {
+ child->get_parents().remove_if([&] (const soinfo* parent) {
+ return parent == si;
+ });
external_unload_list.push_back(child);
} else {
unload_list.push_front(child);