public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix implementation of readelf's -wE and -wN options,
@ 2022-06-30 13:53 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2022-06-30 13:53 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aa40d66bb18c7aa068179f42de52327a0711834e

commit aa40d66bb18c7aa068179f42de52327a0711834e
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jun 30 14:53:02 2022 +0100

    Fix implementation of readelf's -wE and -wN options,
    
            * dwarf.c (dwarf_select_sections_by_name): If the entry's value is
            zero then clear the corresponding variable.
            (dwarf_select_sections_by_letters): Likewise.
            * testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE
            debuginfod tests to fail.

Diff:
---
 binutils/ChangeLog                             |  8 ++++++++
 binutils/dwarf.c                               | 10 ++++++++--
 binutils/testsuite/binutils-all/debuginfod.exp |  4 ++--
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 17c23531e83..2a1ca581320 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2022-06-30  Nick Clifton  <nickc@redhat.com>
+
+	* dwarf.c (dwarf_select_sections_by_name): If the entry's value is
+	zero then clear the corresponding variable.
+	(dwarf_select_sections_by_letters): Likewise.
+	* testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE
+	debuginfod tests to fail.
+
 2022-06-28  Nick Clifton  <nickc@redhat.com>
 
 	PR 29267
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 84200ae4078..4504b0facc6 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -12169,7 +12169,10 @@ dwarf_select_sections_by_names (const char *names)
 	  if (strncmp (p, entry->option, len) == 0
 	      && (p[len] == ',' || p[len] == '\0'))
 	    {
-	      * entry->variable = entry->val;
+	      if (entry->val == 0)
+		* entry->variable = 0;
+	      else
+		* entry->variable = entry->val;
 	      result |= entry->val;
 
 	      p += len;
@@ -12213,7 +12216,10 @@ dwarf_select_sections_by_letters (const char *letters)
 	{
 	  if (entry->letter == * letters)
 	    {
-	      * entry->variable |= entry->val;
+	      if (entry->val == 0)
+		* entry->variable = 0;
+	      else
+		* entry->variable |= entry->val;
 	      result |= entry->val;
 	      break;
 	    }
diff --git a/binutils/testsuite/binutils-all/debuginfod.exp b/binutils/testsuite/binutils-all/debuginfod.exp
index d0e6db23f34..f5935ad0348 100644
--- a/binutils/testsuite/binutils-all/debuginfod.exp
+++ b/binutils/testsuite/binutils-all/debuginfod.exp
@@ -189,7 +189,7 @@ if { [regexp ".*DEBUGINFOD.*" $conf_objdump] } {
     test_fetch_debugaltlink $OBJDUMP "-Wk"
 
     set test "disabling debuginfod access"
-    # setup_xfail *-*-*
+    setup_xfail *-*-*
     test_fetch_debuglink $OBJDUMP "-W -WE"
     set test "debuginfod"
 
@@ -202,7 +202,7 @@ if { [regexp ".*DEBUGINFOD.*" $conf_readelf] } {
     test_fetch_debugaltlink $READELF "-wk"
 
     set test "disabling debuginfod access"
-    # setup_xfail *-*-*
+    setup_xfail *-*-*
     test_fetch_debuglink $READELF "-w -wE"
     set test "debuginfod"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-30 13:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 13:53 [binutils-gdb] Fix implementation of readelf's -wE and -wN options, Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).