about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-lookup.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index d1b8efc5d7..be6f76faa8 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -208,11 +208,6 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
 
   do
     {
-      /* These variables are used in the nested function.  */
-      Elf_Symndx symidx;
-      int num_versions = 0;
-      const ElfW(Sym) *versioned_sym = NULL;
-
       const struct link_map *map = list[i]->l_real;
 
       /* Here come the extra test needed for `_dl_lookup_symbol_skip'.  */
@@ -237,6 +232,10 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
       if (map->l_nbuckets == 0)
 	continue;
 
+      Elf_Symndx symidx;
+      int num_versions = 0;
+      const ElfW(Sym) *versioned_sym = NULL;
+
       /* The tables for this map.  */
       const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
       const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);