This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-552-gff9f1c5


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  ff9f1c5f324eb53adc23bfb80f3c932760c94149 (commit)
      from  e80d6f94e19d17b91e3cd3ada7193cc88f621feb (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=ff9f1c5f324eb53adc23bfb80f3c932760c94149

commit ff9f1c5f324eb53adc23bfb80f3c932760c94149
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Apr 5 05:20:37 2012 -0400

    Fix DL_DEBUG_UNUSED to elide the VDSO and handle PLT references properly.
    
    	* elf/rtld.c (dl_main): If DL_DEBUG_UNUSED is enabled, turn off
    	lazy binding.
    	* elf/dl-lookup (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore
    	undefined symbol errors.
    
    	* elf/rtlc.c (dl_main): Skip VDSO when checking for unused
    	DT_NEEDED entries.

diff --git a/ChangeLog b/ChangeLog
index f934b34..cc4de41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-04-05  David S. Miller  <davem@davemloft.net>
+
+	* elf/rtld.c (dl_main): If DL_DEBUG_UNUSED is enabled, turn off
+	lazy binding.
+	* elf/dl-lookup (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore
+	undefined symbol errors.
+
+	* elf/rtlc.c (dl_main): Skip VDSO when checking for unused
+	DT_NEEDED entries.
+
 2012-04-05  Michael Matz  <matz@suse.de>
 
 	[BZ #13592]
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 839dd3a..a2a699b 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -769,7 +769,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
   if (__builtin_expect (current_value.s == NULL, 0))
     {
       if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
-	  && skip_map == NULL)
+	  && skip_map == NULL
+	  && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
 	{
 	  /* We could find no value for a strong reference.  */
 	  const char *reference_name = undef_map ? undef_map->l_name : "";
diff --git a/elf/rtld.c b/elf/rtld.c
index 1cc9cf3..0362b14 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1967,7 +1967,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
 	      if (dyn->d_tag == DT_NEEDED)
 		{
 		  l = l->l_next;
-
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+		  /* Skip the VDSO since it's not part of the list
+		     of objects we brought in via DT_NEEDED entries.  */
+		  if (l == GLRO(dl_sysinfo_map))
+		    l = l->l_next;
+#endif
 		  if (!l->l_used)
 		    {
 		      if (first)
@@ -2500,6 +2505,14 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
       ++dl_debug;
     }
 
+  if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+    {
+      /* In order to get an accurate picture of whether a particular
+	 DT_NEEDED entry is actually used we have to process both
+	 the PLT and non-PLT relocation entries.  */
+      GLRO(dl_lazy) = 0;
+    }
+
   if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
     {
       size_t cnt;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog       |   10 ++++++++++
 elf/dl-lookup.c |    3 ++-
 elf/rtld.c      |   15 ++++++++++++++-
 3 files changed, 26 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]