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.16-ports-merge-800-gc93ec1f


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  c93ec1f091ec0d114e7a33cb1156e2745162eb4a (commit)
      from  6355e122f552986a55dca427e9377db435c6e18b (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=c93ec1f091ec0d114e7a33cb1156e2745162eb4a

commit c93ec1f091ec0d114e7a33cb1156e2745162eb4a
Author: Carlos O'Donell <carlos_odonell@mentor.com>
Date:   Thu Nov 29 18:09:12 2012 -0800

    Warn about unsupported DT_FLAGS_1 flags.
    
    The dynamic loader will now warn about unsupported DT_FLAGS_1
    flags when run with LD_DEBUG=files or LD_DEBUG=all.

diff --git a/ChangeLog b/ChangeLog
index 9611f6c..dabb7d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-29  Carlos O'Donell  <carlos@systemhalted.org>
+
+	* elf/get-dynamic-info.h (elf_get_dynamic_info): Warn
+	for unsupported DF_1_* bits when DL_DEBUG_FILES is set.
+
 2012-11-29  Mike Frysinger  <vapier@gentoo.org>
 
 	* sysdeps/unix/sysv/linux/clock_getcpuclockid.c (HAS_CPUCLOCK): Delete.
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
index 9e018de..026f246 100644
--- a/elf/get-dynamic-info.h
+++ b/elf/get-dynamic-info.h
@@ -151,8 +151,16 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
     {
       l->l_flags_1 = info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val;
 
-      /* Only DT_1_SUPPORTED_MASK bits are allowed.  */
-      assert ((l->l_flags_1 & ~DT_1_SUPPORTED_MASK) == 0);
+      /* Only DT_1_SUPPORTED_MASK bits are supported, and we would like
+	 to assert this, but we can't. Users have been setting
+	 unsupported DF_1_* flags for a long time and glibc has ignored
+	 them. Therefore to avoid breaking existing applications the
+	 best we can do is add a warning during debugging with the
+	 intent of notifying the user of the problem.  */
+      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
+	  && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
+	_dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
+			  l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
 
       if (l->l_flags_1 & DF_1_NOW)
 	info[DT_BIND_NOW] = info[VERSYMIDX (DT_FLAGS_1)];

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

Summary of changes:
 ChangeLog              |    5 +++++
 elf/get-dynamic-info.h |   12 ++++++++++--
 2 files changed, 15 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]