about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dlsym.c1
-rw-r--r--elf/dlvsym.c14
-rw-r--r--elf/link.h2
3 files changed, 11 insertions, 6 deletions
diff --git a/elf/dlsym.c b/elf/dlsym.c
index 562df42b34..3a4bd4ae69 100644
--- a/elf/dlsym.c
+++ b/elf/dlsym.c
@@ -70,6 +70,7 @@ RTLD_NEXT used in code not dynamically loaded"));
 	struct link_map *mapscope[2] = { map, NULL };
 	args->loadbase = _dl_lookup_symbol_skip (args->name, &args->ref,
 						 mapscope, NULL, match);
+      }
     }
   else
     {
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
     {
diff --git a/elf/link.h b/elf/link.h
index 67701a13b7..90cda5e810 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -455,7 +455,7 @@ extern void _dl_start_profile (struct link_map *map, const char *output_dir);
 extern void _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc);
 
 
-/* Show the member of the auxiliry aray passed up from the kernel.  */
+/* Show the members of the auxiliry aray passed up from the kernel.  */
 extern void _dl_show_auxv (void);
 
 __END_DECLS