This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] Update symbol class decoding in som.c
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sources dot redhat dot com
- Date: Sun, 20 Nov 2005 14:26:16 -0500 (EST)
- Subject: [committed] Update symbol class decoding in som.c
This patch changes the symbol class decoding for weak symbols
when using SOM to be the same as bfd_decode_symclass. This provides
more information and is a step toward fixing the gas weakref
testsuite failures on this target.
Tested on hppa2.0w-hp-hpux11.11.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* som.c (som_decode_symclass): Decode BSF_WEAK symbols in the same
manner as bfd_decode_symclass.
Index: som.c
===================================================================
RCS file: /cvs/src/src/bfd/som.c,v
retrieving revision 1.58
diff -u -3 -p -r1.58 som.c
--- som.c 15 Jun 2005 00:16:10 -0000 1.58
+++ som.c 20 Nov 2005 18:21:15 -0000
@@ -5355,11 +5355,30 @@ som_decode_symclass (asymbol *symbol)
if (bfd_is_com_section (symbol->section))
return 'C';
if (bfd_is_und_section (symbol->section))
- return 'U';
+ {
+ if (symbol->flags & BSF_WEAK)
+ {
+ /* If weak, determine if it's specifically an object
+ or non-object weak. */
+ if (symbol->flags & BSF_OBJECT)
+ return 'v';
+ else
+ return 'w';
+ }
+ else
+ return 'U';
+ }
if (bfd_is_ind_section (symbol->section))
return 'I';
if (symbol->flags & BSF_WEAK)
- return 'W';
+ {
+ /* If weak, determine if it's specifically an object
+ or non-object weak. */
+ if (symbol->flags & BSF_OBJECT)
+ return 'V';
+ else
+ return 'W';
+ }
if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL)))
return '?';