[PATCH] Improved branches to weak symbols

Daniel Gutson dgutson@codesourcery.com
Thu Aug 13 20:41:00 GMT 2009


Hi,

   the attached patch improves the instructions to generate when 
branching to weak symbols.

Rather than jumping to the next instruction, NOPs are generated, and 
selected according to the architecture.

Please let me know if OK to commit.

Thanks!
	Daniel.

-----

	bfd/
	* elf32-arm.c (arch_has_thumb2_nop): New function.
	(arch_has_arm_nop): New function.
	(elf32_arm_final_link_relocate): NOP opcodes changed.

	ld/testsuite/
	* ld-arm/callweak.d: Opcodes updated.
	* ld-arm/callweak.s: Architecture specified.
	* ld-arm/callweak-2.d: New test case.
	* ld-arm/callweak-2.s: New file.


-- 
Daniel Gutson
CodeSourcery
www.codesourcery.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callweak.patch
Type: text/x-diff
Size: 5908 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090813/e9bc22a3/attachment.bin>


More information about the Binutils mailing list