This is the mail archive of the
mailing list for the binutils project.
Re: Only obj_coff_weak() with BFD_ASSEMBLERs
- From: "Aaron W. LaFramboise" <aaron98wiridge9 at aaronwl dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 06 Jul 2004 16:37:56 -0500
- Subject: Re: Only obj_coff_weak() with BFD_ASSEMBLERs
- References: <firstname.lastname@example.org>
Nick Clifton wrote:
> I am applying the patch below to fix up the recent addition of the
> obj_coff_weak() function to gas/config/obj-coff.c so that it is only
> referenced when BFD_ASSEMBLER is defined. This allows several COFF
> based but not non-BFD based ports to build again.
Oops, sorry about that. I didn't realize TE_PE would ever be defined
when BFD_ASSEMBLER wasn't. (I'm assuming its the for obj_coff_weak
inside inside TE_PE that was causing the problem. I think the actual
function has been there for some time.)
On a related note, I need help with getting relocations to work with
COFF weak symbols. When generating relocations, GAS needs to treat weak
symbols as undefined symbols, not as defined symbols, which is what it
presently does. It gets it halfway right, and knows to generate
relocations for weak symbols where a defined symbol wouldn't need one,
but the fixup to the frag and the relocation itself don't create correct
results when linked. All of the obvious places to add this sort of
logic are places I am very hesitant to add changes, such as in
I also think I added some bad code to tc_gen_reloc that uses BFD (I
think) inside of ifdef TE_PE but not BFD_ASSEMBLER. It is wrong in
general, anyway, and once I can figure out how to do the above, the
relocation correcting patch wil remove this silliness as well.
Can anyone give me some hints?
Aaron W. LaFramboise