This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: binutils patches for basic generic i960-elf
From: Martin Dorey <Martin.Dorey@Madge.com>
Date: Tue, 17 Aug 1999 10:27:13 +0100
> My bfd config uses the generic linker - it doesn't provide an
> i960-elf-specific backend relocate_section().
> In general, I recommend writing this. Without it, you won't get many
> of the features of the ELF linker.
Que? bfdint.texi recommends this on the grounds of efficiency and the
ability to handle dynamic linking, neither of which I'm particularly
bothered about for this target. Is there anything else I'm missing out on
by not defining the processor-specific stuff?
Actually, there's not as much as I thought. There are various
features which you only get by defining relocate_section, but most of
them are related to dynamic linking. The only one I see offhand which
you aren't getting is warning sections, and perhaps some error
checking involving symbol types.
> I wonder if it is really correct to discard link once sections when
> doing a relocateable link.
Say all the .linkonce.t.baz sections are combined into .text. How is the
final link then going to know which bits to discard? Or how would you
handle the multiple .linkonce.t.baz sections in the relocatable output?
Certainly it would be incorrect to combine all .linkonce.t sections
into .text when doing a relocateable link. The .linkonce.t sections
would have to preserved as independent sections in the output.
I tried not discarding the duplicate sections when doing a
relocateable link, but it failed because the linker combined the
linkonce sections into a single section, and because it caused trouble
with the MIPS ELF .reginfo section.
Ian