diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-14 05:57:55 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-14 05:57:55 +0000 |
commit | 9869e6ec913e268748f510ab6ec64b8fd62531bc (patch) | |
tree | f3f8b9c049c73755d183cc1c1affd34ee8f9772b /elf/dl-addr.c | |
parent | 3ee87ca7d4c813087eeee8b9fd04b7836244a54a (diff) |
Updated to fedora-glibc-20041014T0548
Diffstat (limited to 'elf/dl-addr.c')
-rw-r--r-- | elf/dl-addr.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/elf/dl-addr.c b/elf/dl-addr.c index c373eb3b17..c418784b4f 100644 --- a/elf/dl-addr.c +++ b/elf/dl-addr.c @@ -38,26 +38,27 @@ _dl_addr (const void *address, Dl_info *info, /* Find the highest-addressed object that ADDRESS is not below. */ match = NULL; - for (struct link_map *l = GL(dl_loaded); l; l = l->l_next) - if (addr >= l->l_map_start && addr < l->l_map_end) - { - /* We know ADDRESS lies within L if in any shared object. - Make sure it isn't past the end of L's segments. */ - size_t n = l->l_phnum; - if (n > 0) - { - do - --n; - while (l->l_phdr[n].p_type != PT_LOAD); - if (addr >= (l->l_addr + - l->l_phdr[n].p_vaddr + l->l_phdr[n].p_memsz)) - /* Off the end of the highest-addressed shared object. */ - continue; - } - - match = l; - break; - } + for (Lmid_t ns = 0; ns < DL_NNS; ++ns) + for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l; l = l->l_next) + if (addr >= l->l_map_start && addr < l->l_map_end) + { + /* We know ADDRESS lies within L if in any shared object. + Make sure it isn't past the end of L's segments. */ + size_t n = l->l_phnum; + if (n > 0) + { + do + --n; + while (l->l_phdr[n].p_type != PT_LOAD); + if (addr >= (l->l_addr + + l->l_phdr[n].p_vaddr + l->l_phdr[n].p_memsz)) + /* Off the end of the highest-addressed shared object. */ + continue; + } + + match = l; + break; + } int result = 0; if (match != NULL) |