Thumb interworking on untyped symbols
Richard Earnshaw
rearnsha@arm.com
Wed Jun 8 16:16:00 GMT 2011
On 31/05/11 15:10, Paul Brook wrote:
> The ARM EABI requires that linkers support interworking for function
> (STT_FUNC) symbols, either via veneers or by bl/blx conversion. We already do
> this.
>
> However for untyped symbols we blindly assume that these are ARM code. At the
> time this was implemented it probably made sense - the EABI didn't exist and
> most of the world was ARM mode anyway. With the advent of Thumb-2 and ARMv7-
> M, likely as not this is wrong.
>
> The EABI only requires interworking be performed for function symbols. For
> other symbols the behavior is less clear, the EABI stating that "interworking
> for untyped symbols must be encoded directly in the object file". By my
> reading that means we should assume the user wrote bl/blx as appropriate and
> leave well alone.
>
> The attached patch implements this by effectively disabling veneer generation
> for symbols that do not have funciton type.
>
Yes, that sounds sensible. In particular a linker only has freedom to
insert a veneer that clobbers IP when it's a STT_FUNC symbol.
R.
More information about the Binutils
mailing list