This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: weak symbols in COFF assembler
- To: pb at futuretv dot com
- Subject: Re: weak symbols in COFF assembler
- From: Nick Clifton <nickc at redhat dot com>
- Date: Fri, 24 Nov 2000 11:30:34 -0800
- CC: binutils at sources dot redhat dot com
Hi Phil,
: 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.
This seems like a reasonable solution, but I am worried about one
thing - where the definition of S_SET_WEAK comes from in the non
BFD_ASSEMBLER case. In your particular case of the i386-pe toolchain
it is coming from obj-aout.h, but can we be sure that all COFF format
non-BFD_ASSEMBLER builds will include this file ?
Maybe it would be safer to change the test to:
#if defined BFD_ASSEMBLER || defined S_SET_WEAK
Cheers
Nick