This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: weak symbols in COFF assembler


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]