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-sym.c | |
parent | 3ee87ca7d4c813087eeee8b9fd04b7836244a54a (diff) | |
download | glibc-9869e6ec913e268748f510ab6ec64b8fd62531bc.tar.gz glibc-9869e6ec913e268748f510ab6ec64b8fd62531bc.tar.xz glibc-9869e6ec913e268748f510ab6ec64b8fd62531bc.zip |
Updated to fedora-glibc-20041014T0548
Diffstat (limited to 'elf/dl-sym.c')
-rw-r--r-- | elf/dl-sym.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/elf/dl-sym.c b/elf/dl-sym.c index a94610263d..ba00ef56f4 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -69,17 +69,19 @@ do_sym (void *handle, const char *name, void *who, /* If the address is not recognized the call comes from the main program (we hope). */ - struct link_map *match = GL(dl_loaded); + struct link_map *match = GL(dl_ns)[LM_ID_BASE]._ns_loaded; /* Find the highest-addressed object that CALLER is not below. */ - for (struct link_map *l = GL(dl_loaded); l != NULL; l = l->l_next) - if (caller >= l->l_map_start && caller < l->l_map_end) - { - /* There must be exactly one DSO for the range of the virtual - memory. Otherwise something is really broken. */ - match = l; - break; - } + for (Lmid_t ns = 0; ns < DL_NNS; ++ns) + for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL; + l = l->l_next) + if (caller >= l->l_map_start && caller < l->l_map_end) + { + /* There must be exactly one DSO for the range of the virtual + memory. Otherwise something is really broken. */ + match = l; + break; + } if (handle == RTLD_DEFAULT) /* Search the global scope. */ @@ -88,7 +90,7 @@ do_sym (void *handle, const char *name, void *who, NULL); else if (handle == RTLD_NEXT) { - if (__builtin_expect (match == GL(dl_loaded), 0)) + if (__builtin_expect (match == GL(dl_ns)[LM_ID_BASE]._ns_loaded, 0)) { if (match == NULL || caller < match->l_map_start |