OSDN Git Service

linker: remove link from external library on unload am: b37d10cc80 am: 3a644889b2...
authorDimitry Ivanov <dimitry@google.com>
Tue, 16 May 2017 22:21:23 +0000 (22:21 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 16 May 2017 22:21:23 +0000 (22:21 +0000)
am: 85efd3b591

Change-Id: I115a7adb07feedf81064c0e740cfc617263eb689

1  2 
linker/linker.cpp

@@@ -1775,9 -2246,12 +1775,12 @@@ static void soinfo_unload(soinfo* soinf
          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);
 +        } else if (child->get_parents().empty()) {
 +          unload_list.push_back(child);
          }
        }
      } else {