Load libraries in breadth-first order

This patch fixes the problem with symbol search order
  for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
  and ld_preloads in correct order.

Bug: https://code.google.com/p/android/issues/detail?id=74255
Attempt: 2

(cherry picked from commit 14669a939d)

Change-Id: Id87540c96a2242220967b6fa5d84ddcd829e2b97
This commit is contained in:
Dmitriy Ivanov
2014-09-05 16:42:53 -07:00
parent c0133a73b6
commit ae69a9584b
13 changed files with 763 additions and 202 deletions

View File

@@ -101,7 +101,6 @@ int phdr_table_get_arm_exidx(const ElfW(Phdr)* phdr_table, size_t phdr_count, El
#endif
void phdr_table_get_dynamic_section(const ElfW(Phdr)* phdr_table, size_t phdr_count,
ElfW(Addr) load_bias,
ElfW(Dyn)** dynamic, size_t* dynamic_count, ElfW(Word)* dynamic_flags);
ElfW(Addr) load_bias, ElfW(Dyn)** dynamic);
#endif /* LINKER_PHDR_H */