weak symbols in COFF assembler

Nick Clifton nickc@redhat.com
Fri Nov 24 11:30:00 GMT 2000


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


More information about the Binutils mailing list