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]
Other format: [Raw text]

Re: Only obj_coff_weak() with BFD_ASSEMBLERs


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
bfd_perform_relocations.

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


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