ARMv4-t TLS stub fix

Paul Brook paul@codesourcery.com
Tue May 31 14:11:00 GMT 2011


The attached patch fixes a bug in the ARMv4t TLS call stubs.  We generate the 
right kind of stub, then ignore this and splat a blx instruction in there 
anyway.

The ST_BRANCH_TO_ARM isn't strictly necessary at this point (data symbols will 
be marked ST_BRANCH_TO_ARM anyway), but that's going to change shortly.

I suspect someone was a bit naughty and created the testcases based on 
observed output rather than expected results. The blx is clearly wrong.

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

Paul

2011-05-31  Paul Brook  <paul@codesourcery.com>

	bfd/
	* elf32-arm.c (arm_stub_is_thumb): Add
	arm_stub_long_branch_v4t_thumb_tls_pic.
	(elf32_arm_final_link_relocate): TLS stubs are always ARM.
	Handle Thumb stubs.

	ld/testsuite/
	* ld-arm/tls-longplt.d: Update expected output.
	* ld-arm/tls-thumb1.d: Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 3342 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20110531/40af4ba5/attachment.bin>


More information about the Binutils mailing list