[binutils-gdb/binutils-2_34-branch] Re: PR24511, nm should not mark symbols in .init_array as "t"

Alan Modra amodra@sourceware.org
Thu Feb 27 21:51:00 GMT 2020


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

commit 40bfb9762747f8336b17c70a0173d10200fa62eb
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Feb 27 17:28:47 2020 +1030

    Re: PR24511, nm should not mark symbols in .init_array as "t"
    
    	PR 24511
    	* syms.c (bfd_decode_symclass): Reverse order of coff_section_type
    	and decode_section_type calls.

Diff:
---
 bfd/ChangeLog | 6 ++++++
 bfd/syms.c    | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 51eda90..702416c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-27  Alan Modra  <amodra@gmail.com>
+
+	PR 24511
+	* syms.c (bfd_decode_symclass): Reverse order of coff_section_type
+	and decode_section_type calls.
+
 2020-02-25  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR binutils/25584
diff --git a/bfd/syms.c b/bfd/syms.c
index 128cf19..8a8b74f 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -705,9 +705,9 @@ bfd_decode_symclass (asymbol *symbol)
     c = 'a';
   else if (symbol->section)
     {
-      c = decode_section_type (symbol->section);
+      c = coff_section_type (symbol->section->name);
       if (c == '?')
-	c = coff_section_type (symbol->section->name);
+	c = decode_section_type (symbol->section);
     }
   else
     return '?';



More information about the Binutils-cvs mailing list