Merge "Add offset to backtrace_string printing." am: f6a5afcb62
am: c4d31c981a

Change-Id: Iab1201771f12ce3e59954a88d2a897ba68f74984
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 8e7a141..201e187 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1776,6 +1776,9 @@
         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 if (child->get_parents().empty()) {
           unload_list.push_back(child);