ARM calls to udefined functions

Paul Brook paul@codesourcery.com
Fri Jun 29 15:05:00 GMT 2007


The ARM EABI specifies that R_ARM_CALL and R_ARM_THM_CALL against a weak 
undefined symbol result in a jump to the next instruction.

Other jump relocations are undefined, so we do the same for the ones that 
happen to be in the same case statement.

Tested on arm-none-eabi.
Applied to CVS head.

Paul

2007-06-29  Paul Brook  <paul@codesourcery.com>

	bfd/
	* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
	call veneers for call relocations against undefined symbols.
	(elf32_arm_final_link_relocate): Turn call to undefined symbol
	into a jump to the next instruction.

	ld/testuite/
	* ld-arm/arm-elf.exp (armelftests): Add callweak.
	* ld-arm/callweak.d: New test.
	* ld-arm/callweak.s: New test.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.callweak
Type: text/x-diff
Size: 5333 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20070629/3e4b31dd/attachment.bin>


More information about the Binutils mailing list