summaryrefslogtreecommitdiffstats
path: root/0002-PR24511.patch
blob: a763d41e7fb556a74b9ce9f33d259d685dfe422b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 40bfb9762747f8336b17c70a0173d10200fa62eb Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Thu, 27 Feb 2020 17:28:47 +1030
Subject: [PATCH] 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.
---
 bfd/ChangeLog | 6 ++++++
 bfd/syms.c    | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/bfd/syms.c b/bfd/syms.c
index 128cf191453..8a8b74f3f92 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 '?';
-- 
2.18.2