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
Change-Id: I4cf84c70dbaabe99310230dfda12385ae5401859
This commit is contained in:
Dmitriy Ivanov
2014-07-29 14:21:45 -07:00
parent ec95a9cf11
commit a3ad450a2e
12 changed files with 812 additions and 179 deletions

View File

@@ -245,6 +245,7 @@ soinfo* get_libdl_info() {
__libdl_info.bucket = g_libdl_buckets;
__libdl_info.chain = g_libdl_chains;
__libdl_info.has_DT_SYMBOLIC = true;
__libdl_info.ref_count = 1;
}
return &__libdl_info;