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:22 +0000 (22:21 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Tue, 16 May 2017 22:21:22 +0000 (22:21 +0000)
am: 85efd3b591

Change-Id: I0b41cdffdccab8b79a4d9c6327dc0f6f521c1acf

1  2 
linker/linker.cpp

@@@ -1776,9 -2246,12 +1776,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 {