From: Ulrich Drepper Date: Thu, 14 Oct 2004 16:08:53 +0000 (+0000) Subject: (elf_machine_runtime_link_map): Replace iteration over GL(dl_loaded) X-Git-Tag: glibc-2.16-ports-before-merge~1121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a270d32ff2a400eea60f9c8f1c5a48bc26c062b6;p=thirdparty%2Fglibc.git (elf_machine_runtime_link_map): Replace iteration over GL(dl_loaded) chain with iteration over all namespaces' _ns_loaded chains. --- diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 944f3c10a5f..49fdffb93dc 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -231,10 +231,11 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) } } - { - struct link_map *l = GL(dl_loaded); + struct link_map *l; + Lmid_t nsid; - while (l) + for (nsid = 0; nsid < DL_NNS; ++nsid) + for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next) { ElfW(Addr) base, limit; const ElfW(Phdr) *p = l->l_phdr; @@ -250,9 +251,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) return l; } } - l = l->l_next; } - } _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL;