This is the mail archive of the
mailing list for the binutils project.
Re: Only obj_coff_weak() with BFD_ASSEMBLERs
- From: Nick Clifton <nickc at redhat dot com>
- To: "Aaron W. LaFramboise" <aaron98wiridge9 at aaronwl dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 13 Jul 2004 19:23:04 +0100
- Subject: Re: Only obj_coff_weak() with BFD_ASSEMBLERs
- References: <firstname.lastname@example.org> <40EB1BB4.email@example.com>
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
Changing and debugging reloc processing in BFD is notoriously difficult.
It is also well known that bfd_perform_relocations() often fails to do
what is desired so a lot of backends choose to perform their own reloc
For simplicity sake this is what I suggest you do for now. Look at the
backend specific file for the target you are interested in (coff-i386.c
??) and try adding to or defining its coff_relocate_section function.