Only obj_coff_weak() with BFD_ASSEMBLERs
Nick Clifton
nickc@redhat.com
Tue Jul 13 18:14:00 GMT 2004
Hi Aaron,
> 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
> bfd_perform_relocations.
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
processing.
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.
Cheers
Nick
More information about the Binutils
mailing list