about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-14 21:40:32 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-14 21:40:32 +0000
commit81f3ac4c9a003161d3396ea9322ca7330adedefa (patch)
tree21443ee882f1e124aaec974032b4c552a5922f2d /elf
parentc9300aefcd97dffc51d28e8dd5018c6b1a5447c3 (diff)
downloadglibc-81f3ac4c9a003161d3396ea9322ca7330adedefa.tar.gz
glibc-81f3ac4c9a003161d3396ea9322ca7330adedefa.tar.xz
glibc-81f3ac4c9a003161d3396ea9322ca7330adedefa.zip
Update.
2003-05-14  Jakub Jelinek  <jakub@redhat.com>

	* elf/rtld.c (dl_main): For LD_TRACE_PRELINKING print search scope
	even if no DT_NEEDED is present.
Diffstat (limited to 'elf')
-rw-r--r--elf/rtld.c81
1 files changed, 38 insertions, 43 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index e9e781aa95..a0d8e98c57 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1262,57 +1262,52 @@ cannot allocate TLS data structures for initial thread");
 	 important that we do this before real relocation, because the
 	 functions we call below for output may no longer work properly
 	 after relocation.  */
-      if (! GL(dl_loaded)->l_info[DT_NEEDED])
-	_dl_printf ("\tstatically linked\n");
-      else
+      struct link_map *l;
+
+      if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
 	{
-	  struct link_map *l;
+	  struct r_scope_elem *scope = &GL(dl_loaded)->l_searchlist;
 
-	  if (GL(dl_debug_mask) & DL_DEBUG_PRELINK)
+	  for (i = 0; i < scope->r_nlist; i++)
 	    {
-	      struct r_scope_elem *scope = &GL(dl_loaded)->l_searchlist;
-
-	      for (i = 0; i < scope->r_nlist; i++)
+	      l = scope->r_list [i];
+	      if (l->l_faked)
 		{
-		  l = scope->r_list [i];
-		  if (l->l_faked)
-		    {
-		      _dl_printf ("\t%s => not found\n", l->l_libname->name);
-		      continue;
-		    }
-		  if (_dl_name_match_p (GL(dl_trace_prelink), l))
-		    GL(dl_trace_prelink_map) = l;
-		  _dl_printf ("\t%s => %s (0x%0*Zx, 0x%0*Zx)",
-			      l->l_libname->name[0] ? l->l_libname->name
-			      : rtld_progname ?: "<main program>",
-			      l->l_name[0] ? l->l_name
-			      : rtld_progname ?: "<main program>",
-			      (int) sizeof l->l_map_start * 2,
-			      l->l_map_start,
-			      (int) sizeof l->l_addr * 2,
-			      l->l_addr);
+		  _dl_printf ("\t%s => not found\n", l->l_libname->name);
+		  continue;
+		}
+	      if (_dl_name_match_p (GL(dl_trace_prelink), l))
+		GL(dl_trace_prelink_map) = l;
+	      _dl_printf ("\t%s => %s (0x%0*Zx, 0x%0*Zx)",
+			  l->l_libname->name[0] ? l->l_libname->name
+			  : rtld_progname ?: "<main program>",
+			  l->l_name[0] ? l->l_name
+			  : rtld_progname ?: "<main program>",
+			  (int) sizeof l->l_map_start * 2, l->l_map_start,
+			  (int) sizeof l->l_addr * 2, l->l_addr);
 #ifdef USE_TLS
-		  if (l->l_tls_modid)
-		    _dl_printf (" TLS(0x%Zx, 0x%0*Zx)\n", l->l_tls_modid,
-				(int) sizeof l->l_tls_offset * 2,
-				l->l_tls_offset);
-		  else
+	      if (l->l_tls_modid)
+		_dl_printf (" TLS(0x%Zx, 0x%0*Zx)\n", l->l_tls_modid,
+			    (int) sizeof l->l_tls_offset * 2,
+			    l->l_tls_offset);
+	      else
 #endif
-		    _dl_printf ("\n");
-		}
-	    }
-	  else
-	    {
-	      for (l = GL(dl_loaded)->l_next; l; l = l->l_next)
-		if (l->l_faked)
-		  /* The library was not found.  */
-		  _dl_printf ("\t%s => not found\n", l->l_libname->name);
-		else
-		  _dl_printf ("\t%s => %s (0x%0*Zx)\n", l->l_libname->name,
-			      l->l_name, (int) sizeof l->l_map_start * 2,
-			      l->l_map_start);
+		_dl_printf ("\n");
 	    }
 	}
+      else if (! GL(dl_loaded)->l_info[DT_NEEDED])
+	_dl_printf ("\tstatically linked\n");
+      else
+	{
+	  for (l = GL(dl_loaded)->l_next; l; l = l->l_next)
+	    if (l->l_faked)
+	      /* The library was not found.  */
+	      _dl_printf ("\t%s => not found\n", l->l_libname->name);
+	    else
+	      _dl_printf ("\t%s => %s (0x%0*Zx)\n", l->l_libname->name,
+			  l->l_name, (int) sizeof l->l_map_start * 2,
+			  l->l_map_start);
+	}
 
       if (__builtin_expect (mode, trace) != trace)
 	for (i = 1; i < (unsigned int) _dl_argc; ++i)