Fix dlsym() to take into account RTLD_GLOBAL/LOCAL

Symbols from libraries opened with RTLD_LOCAL (default)
  should not be visible via dlsym(RLTD_DEFAULT/RTLD_NEXT, .)

Bug: 17512583
Change-Id: I1758943081a67cf3d49ba5808e061b8251a91964
This commit is contained in:
Dmitriy Ivanov
2014-09-15 17:00:10 -07:00
parent 0b8f6d592a
commit e8ba50fe0d
5 changed files with 73 additions and 20 deletions

View File

@@ -232,7 +232,7 @@ static unsigned g_libdl_chains[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0 };
static unsigned g_libdl_chains[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
#endif
static soinfo __libdl_info("libdl.so", nullptr);
static soinfo __libdl_info("libdl.so", nullptr, RTLD_GLOBAL);
// This is used by the dynamic linker. Every process gets these symbols for free.
soinfo* get_libdl_info() {