diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-03-03 17:10:55 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-03-03 17:10:55 +0000 |
commit | d15f124ff59606604c0243ee19cd67bc99ecd09f (patch) | |
tree | f0b18e431b15b797d5f5dc980928cd1a26b8f74a /libc/elf/dl-sym.c | |
parent | c1078e9067234e88d5c1ca8af18ae67b64141d66 (diff) |
Merge changes between r22241 and r22552 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@22553 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/elf/dl-sym.c')
-rw-r--r-- | libc/elf/dl-sym.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libc/elf/dl-sym.c b/libc/elf/dl-sym.c index d2b4db7ec..05de6c1c0 100644 --- a/libc/elf/dl-sym.c +++ b/libc/elf/dl-sym.c @@ -91,20 +91,10 @@ do_sym (void *handle, const char *name, void *who, lookup_t result; ElfW(Addr) caller = (ElfW(Addr)) who; + struct link_map *l = _dl_find_dso_for_object (caller); /* If the address is not recognized the call comes from the main program (we hope). */ - struct link_map *match = GL(dl_ns)[LM_ID_BASE]._ns_loaded; - - /* Find the highest-addressed object that CALLER is not below. */ - for (Lmid_t ns = 0; ns < GL(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 - && (l->l_contiguous || _dl_addr_inside_object (l, caller))) - { - match = l; - break; - } + struct link_map *match = l ? l : GL(dl_ns)[LM_ID_BASE]._ns_loaded; if (handle == RTLD_DEFAULT) { |