Fix relocation to look for symbols in local group

The local group is a sequence of libraries in default (breadth-first)
  order. It allows RTLD_LOCALLY loaded library to correctly relocate
  symbols within its group (see test-cases).

  Local group lookup is performed after main executable and ld_preloads.

Bug: 2643900
Bug: 15432753
Change-Id: I9bb013b46d17dbb5cbdfb8fef26f552748385541
This commit is contained in:
Dmitriy Ivanov
2014-10-21 09:23:18 -07:00
parent cf8ea37fc9
commit cfa97f172d
14 changed files with 688 additions and 162 deletions

View File

@@ -86,7 +86,7 @@ class LinkedList {
}
template<typename F>
void for_each(F action) {
void for_each(F action) const {
visit([&] (T* si) {
action(si);
return true;
@@ -94,7 +94,7 @@ class LinkedList {
}
template<typename F>
bool visit(F action) {
bool visit(F action) const {
for (LinkedListEntry<T>* e = head_; e != nullptr; e = e->next) {
if (!action(e->element)) {
return false;