This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.14-175-g174baab
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Aug 2011 20:13:29 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.14-175-g174baab
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 174baab3f9c3dfff4e16fd5b9eb2e5fb5c27db74 (commit)
from f0f47fa064bec45d40f586def9c0d1a505762b09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=174baab3f9c3dfff4e16fd5b9eb2e5fb5c27db74
commit 174baab3f9c3dfff4e16fd5b9eb2e5fb5c27db74
Author: Ulrich Drepper <drepper@gmail.com>
Date: Tue Aug 16 16:11:03 2011 -0400
Improve printing of lookup scopes
The scope of a new object should be printed earlier and when the scope
of an already loaded object is extended only the changes should be
printed.
diff --git a/ChangeLog b/ChangeLog
index 15c0144..6dbab2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-08-16 Ulrich Drepper <drepper@gmail.com>
+ * 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.
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 980c47e..65fdd31 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -288,6 +288,10 @@ dl_open_worker (void *a)
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 @@ dl_open_worker (void *a)
/* 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 @@ cannot load any more object with static TLS"));
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,12 +634,12 @@ no more namespaces available for dlmopen()"));
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)
{
_dl_debug_printf (" scope %u:", scope_cnt);
diff --git a/elf/rtld.c b/elf/rtld.c
index 478d037..87bb5f0 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2197,7 +2197,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
_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)
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 8c7f00f..b24bff3 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -1106,7 +1106,7 @@ extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr)
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
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
elf/dl-open.c | 14 +++++++-------
elf/rtld.c | 2 +-
sysdeps/generic/ldsodefs.h | 2 +-
4 files changed, 16 insertions(+), 9 deletions(-)
hooks/post-receive
--
GNU C Library master sources