The problem with linkonce sections in ELF

H . J . Lu
Thu Feb 3 11:17:00 GMT 2000

On Tue, Feb 01, 2000 at 04:39:00PM -0500, Ian Lance Taylor wrote:
> .rel.text section normally hold relocations.  The linker expects them
> to do so.  Do these .rel.text sections hold relocations?  If they do,
> then naturally the linker will remove them, just as it removes all
> relocation sections.

I think I found the problem. build_link_order () is called very
late. Before that, the input section list of the output section
is always empty. When we strip a linkonce section,
_bfd_strip_section_from_output removes the corresponding output
section by mistake since its input section list is empty. I don't
know what the best fix is.


H.J. Lu (

More information about the Binutils mailing list