Problems with branch-to-arm-from-thumb for typeless symbol
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Mon Apr 15 20:42:00 GMT 2013
> From: Hans-Peter Nilsson <hp@axis.com>
> Date: Mon, 8 Apr 2013 13:14:05 +0200
Ping.
> > From: Richard Earnshaw <rearnsha@arm.com>
> > Date: Mon, 8 Apr 2013 12:46:00 +0200
>
> > [sorry for the delayed reply, I've been OoO quite a bit recently]
> >
> > No.
> >
> > The linker should not be inserting code sequences that clobber register
> > values when the ABI has not given it explicit permission to do
> > so.
>
> Wrong, this does not happen. I can't help but thinking you have
> misunderstood: no registers are clobbered for veneers from thumb
> to arm, which is the issue at hand and what I'm fixing. Oh, I
> think I see: the test-case can be confusing but it's the
> *from-thumb* veneer in the test-cases that is generated with the
> patch! (The from-arm veneers are generated anyway even without,
> due to .thumb_func.)
>
> Nick gave his ok, but I'll not act on that until we have
> consensus.
>
> > An
> > interworking veneer can need that and as such it is incorrect to make
> > this change.
> >
> > It might in theory be possible to do this safely when you have the BLX
> > <sym> instruction (ARMv5),
>
> There was no BLX in the stubs I observed (because they're
> default off due to an errata fix and have to be explicitly
> enabled for v6).
>
> > but that then leads to inconsistency across
> > architecture versions and that's equally undesirable.
>
> Again, those mode-switching veneers from thumb to arm (to
> typeless symbols) already happen when the branch is out of
> range, so what we have now is inconsistent: the patch *restores*
> consistency.
>
> Does any of this change your decision?
>
> brgds, H-P
>
More information about the Binutils
mailing list