[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r14957 - in /fsf/trunk/libc: ChangeLog elf/dl-open.c elf/rtld.c sysdeps/generic/ldsodefs.h



Author: eglibc
Date: Wed Aug 17 00:04:57 2011
New Revision: 14957

Log:
Import glibc-mainline for 2011-08-17

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/dl-open.c
    fsf/trunk/libc/elf/rtld.c
    fsf/trunk/libc/sysdeps/generic/ldsodefs.h

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Aug 17 00:04:57 2011
@@ -1,3 +1,15 @@
+2011-08-16  Ulrich Drepper  <drepper@xxxxxxxxx>
+
+	* elf/dl-open.c (_dl_show_scope): Take additional parameter which
+	specifies first scope to show.
+	(dl_open_worker): Update callers.  Move printing scope of new
+	object to before the relocation.
+	* rtld.c (dl_main): Update _dl_show_scope call.
+	* sysdeps/generic/ldsodefs.h: Update declaration.
+
+	* elf/dl-open.c (_dl_show_scope): Use _dl_debug_printf to generate the
+	string for the scope number.
+
 2011-08-14  Ulrich Drepper  <drepper@xxxxxxxxx>
 
 	* nscd/servicescache.c (cache_addserv): Make sure written is always

Modified: fsf/trunk/libc/elf/dl-open.c
==============================================================================
--- fsf/trunk/libc/elf/dl-open.c (original)
+++ fsf/trunk/libc/elf/dl-open.c Wed Aug 17 00:04:57 2011
@@ -288,6 +288,10 @@
   r->r_state = RT_CONSISTENT;
   _dl_debug_state ();
 
+  /* Print scope information.  */
+  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+    _dl_show_scope (new, 0);
+
   /* Only do lazy relocation if `LD_BIND_NOW' is not set.  */
   int reloc_mode = mode & __RTLD_AUDIT;
   if (GLRO(dl_lazy))
@@ -407,7 +411,7 @@
 
 	  /* Print scope information.  */
 	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-	    _dl_show_scope (imap);
+	    _dl_show_scope (imap, cnt);
 	}
       /* Only add TLS memory if this object is loaded now and
 	 therefore is not yet initialized.  */
@@ -493,10 +497,6 @@
   if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
     _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
 		      new->l_name, new->l_ns, new->l_direct_opencount);
-
-  /* Print scope information.  */
-  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
-    _dl_show_scope (new);
 }
 
 
@@ -634,21 +634,16 @@
 
 
 void
-_dl_show_scope (struct link_map *l)
+_dl_show_scope (struct link_map *l, int from)
 {
   _dl_debug_printf ("object=%s [%lu]\n",
 		    *l->l_name ? l->l_name : rtld_progname, l->l_ns);
   if (l->l_scope != NULL)
-    for (int scope_cnt = 0; l->l_scope[scope_cnt] != NULL; ++scope_cnt)
+    for (int scope_cnt = from; l->l_scope[scope_cnt] != NULL; ++scope_cnt)
       {
-	char numbuf[2];
-	unsigned int cnt;
-
-	numbuf[0] = '0' + scope_cnt;
-	numbuf[1] = '\0';
-	_dl_debug_printf (" scope %s:", numbuf);
-
-	for (cnt = 0; cnt < l->l_scope[scope_cnt]->r_nlist; ++cnt)
+	_dl_debug_printf (" scope %u:", scope_cnt);
+
+	for (unsigned int cnt = 0; cnt < l->l_scope[scope_cnt]->r_nlist; ++cnt)
 	  if (*l->l_scope[scope_cnt]->r_list[cnt]->l_name)
 	    _dl_debug_printf_c (" %s",
 				l->l_scope[scope_cnt]->r_list[cnt]->l_name);

Modified: fsf/trunk/libc/elf/rtld.c
==============================================================================
--- fsf/trunk/libc/elf/rtld.c (original)
+++ fsf/trunk/libc/elf/rtld.c Wed Aug 17 00:04:57 2011
@@ -2197,7 +2197,7 @@
       _dl_debug_printf ("\nInitial object scopes\n");
 
       for (struct link_map *l = main_map; l != NULL; l = l->l_next)
-	_dl_show_scope (l);
+	_dl_show_scope (l, 0);
     }
 
   if (prelinked)

Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Wed Aug 17 00:04:57 2011
@@ -1106,7 +1106,7 @@
      internal_function attribute_hidden;
 
 /* Show show of an object.  */
-extern void _dl_show_scope (struct link_map *new);
+extern void _dl_show_scope (struct link_map *new, int from);
 
 __END_DECLS