1 --- a/ldso/libdl/libdl.c
2 +++ b/ldso/libdl/libdl.c
3 @@ -671,7 +671,7 @@ static void *do_dlsym(void *vhandle, con
5 struct elf_resolve *tpnt, *tfrom;
6 struct dyn_elf *handle;
11 struct symbol_ref sym_ref = { NULL, NULL };
12 @@ -729,7 +729,12 @@ static void *do_dlsym(void *vhandle, con
14 if (handle == _dl_symbol_tables)
15 tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */
16 - ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
18 + ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
21 + handle = handle->next;
22 + } while (from && handle);
24 #if defined(USE_TLS) && USE_TLS && defined SHARED
25 if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) {