Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 20 Feb 1999 23:57:48 +0000 (23:57 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 20 Feb 1999 23:57:48 +0000 (23:57 +0000)
* elf/dl-deps.c (_dl_map_object_deps): Don't add dummy objects created
for tracing to the scope lists.
* elf/do-lookup.h: Remove test for l_opencount == 0 after above change.
DT_SYMTAB is always available according to ELF spec.

ChangeLog
elf/dl-deps.c
elf/do-lookup.h

index 7b92046..0d8cdb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 1999-02-20  Ulrich Drepper  <drepper@cygnus.com>
 
+       * elf/dl-deps.c (_dl_map_object_deps): Don't add dummy objects created
+       for tracing to the scope lists.
+       * elf/do-lookup.h: Remove test for l_opencount == 0 after above change.
+       DT_SYMTAB is always available according to ELF spec.
+
        * elf/dl-lookup.c (_dl_lookup_symbol_skip): Before first do_lookup
        call test whether there is any scope left.
        (_dl_lookup_versioned_symbol_skip): Likewise.
index ca0d932..7291cde 100644 (file)
@@ -385,7 +385,11 @@ _dl_map_object_deps (struct link_map *map,
 
   for (nlist = 0, runp = known; runp; runp = runp->unique)
     {
-      map->l_searchlist.r_list[nlist++] = runp->map;
+      if (trace_mode && runp->map->l_opencount == 0)
+       /* This can happen when we trace the loading.  */
+       --map->l_searchlist.r_nlist;
+      else
+       map->l_searchlist.r_list[nlist++] = runp->map;
 
       /* Now clear all the mark bits we set in the objects on the search list
         to avoid duplicates, so the next call starts fresh.  */
@@ -406,7 +410,11 @@ _dl_map_object_deps (struct link_map *map,
                          "cannot allocate symbol search list");
 
       for (cnt = 0, runp = known; runp; runp = runp->dup)
-       map->l_searchlist.r_duplist[cnt++] = runp->map;
+       if (trace_mode && runp->map->l_opencount == 0)
+         /* This can happen when we trace the loading.  */
+         --map->l_searchlist.r_nduplist;
+       else
+         map->l_searchlist.r_duplist[cnt++] = runp->map;
     }
 
   /* Now that all this succeeded put the objects in the global scope if
index 1a833be..691dcc8 100644 (file)
@@ -56,20 +56,11 @@ FCT (const char *undef_name, unsigned long int hash,
       if (skip != NULL && map == skip)
        continue;
 
-      /* Skip objects that could not be opened, which can occur in trace
-        mode.  */
-      if (map->l_opencount == 0)
-       continue;
-
       /* Don't search the executable when resolving a copy reloc.  */
       if (elf_machine_lookup_noexec_p (reloc_type)
          && map->l_type == lt_executable)
        continue;
 
-      /* Skip objects without symbol tables.  */
-      if (map->l_info[DT_SYMTAB] == NULL)
-       continue;
-
       /* Print some debugging info if wanted.  */
       if (_dl_debug_symbols)
        _dl_debug_message (1, "symbol=", undef_name, ";  lookup in file=",