]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(elf_machine_runtime_link_map): Replace iteration over GL(dl_loaded)
authorUlrich Drepper <drepper@redhat.com>
Thu, 14 Oct 2004 16:08:53 +0000 (16:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 14 Oct 2004 16:08:53 +0000 (16:08 +0000)
chain with iteration over all namespaces' _ns_loaded chains.

sysdeps/mips/dl-machine.h

index 944f3c10a5f6517e7d06ddac7ffd205fa2461486..49fdffb93dc678857d98ea4e9d33e7d4bb4fc23f 100644 (file)
@@ -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;