This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with branch-to-arm-from-thumb for typeless symbol

> From: Richard Earnshaw <>
> 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

>  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*

Does any of this change your decision?

brgds, H-P

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]