about summary refs log tree commit diff
path: root/elf/dlvsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dlvsym.c')
-rw-r--r--elf/dlvsym.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/elf/dlvsym.c b/elf/dlvsym.c
index b4c4f731e0..bdfb83da59 100644
--- a/elf/dlvsym.c
+++ b/elf/dlvsym.c
@@ -67,11 +67,15 @@ RTLD_NEXT used in code not dynamically loaded"));
       while (l->l_loader)
 	l = l->l_loader;
 
-      args->loadbase = _dl_lookup_versioned_symbol_skip	(args->name,
-							 &args->ref,
-							 mapscope,
-							 NULL,
-							 match);
+      {
+	struct link_map *map = l;
+	struct link_map *mapscope[2] = { map, NULL };
+	args->loadbase = _dl_lookup_versioned_symbol_skip (args->name,
+							   &args->ref,
+							   mapscope,
+							   NULL,
+							   match);
+      }
     }
   else
     {