[patch] Honour SHF_LINK_ORDER

Paul Brook paul@codesourcery.com
Tue Jul 13 23:35:00 GMT 2004


The following patch implements the semantics required by the elf 
SHF_LINK_ORDER flag. This specifies that when sections are combined they must 
be arranged in the same order as the sections to which they are linked.

I couldn't see any way of implementing this in the generic linker, so 
implemented it in the elf linking code. If this can be done "properly" please 
point me in the right direction.

This behaviour is required for ARM EABI unwinding tables. I have verified 
correct operation using a modified assembler. I'll try to add testcases when 
submitting the assembler changes.

AFAICS the only other target that uses SHF_LINK_ORDER is ia64, and this 
doesn't rely on the semantics.

Tested on i686-linux and cross to arm-none-elf and ia64-linux.
Ok?

Paul

2003-07-14  Paul Brook  <paul@codesourcery.com>

	* elflink.c (elf_get_linked_section_vma, compare_link_order,
	elf_fixup_link_order): New functions.
	(bfd_elf_final_link): Call elf_fixup_link_order.



More information about the Binutils mailing list