weak symbols in COFF assembler
Philip Blundell
pb@futuretv.com
Thu Nov 23 06:02:00 GMT 2000
I've been experiencing a problem with weak symbols on an i386-pe target. (This
is a non BFD_ASSEMBLER configuration.)
In obj_coff_weak the symbol class was correctly being set to C_NT_WEAK. But
later, in coff_frob_symbol, it was set back to C_EXT because S_ISWEAK()
returned false. This patch fixes the problem; I suspect it would also be OK
to remove the S_SET_STORAGE_CLASS calls from obj_coff_weak and rely on
coff_frob_symbol, but I'm not sure.
Thanks
p.
2000-11-23 Philip Blundell <pb@futuretv.com>
* config/obj-coff.c (obj_coff_weak): Call S_SET_WEAK regardless of
BFD_ASSEMBLER.
Index: obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.36
diff -u -r1.36 obj-coff.c
--- obj-coff.c 2000/11/08 00:24:23 1.36
+++ obj-coff.c 2000/11/23 13:59:11
@@ -220,9 +220,7 @@
*input_line_pointer = c;
SKIP_WHITESPACE ();
-#ifdef BFD_ASSEMBLER
S_SET_WEAK (symbolP);
-#endif
#ifdef TE_PE
S_SET_STORAGE_CLASS (symbolP, C_NT_WEAK);
More information about the Binutils
mailing list