This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ARM/THUMB long calls stubs
Hi,
On Thu, Jul 29, 2004 at 04:58:31PM +0100, Nick Clifton wrote:
> >Would it be hard to do patch (against gcc 3.4.1) to try following (thumb
> >mode):
> >
> > bl 1f
> > b 2f
> >1: bx Rn
> >2:
>
> Indeed - try the attached patch.
Thanks.
> >And maybe following in ARM mode:
> >
> > bl 1f
> >1: add lr,lr,#8 /* is this ok? */
> > bx Rn
>
> I do not think that this should be needed. The problem, if I recall
> correctly, was that the call_via_... stub functions might have been out
> of range of the Thumb's BL instruction. Since these stubs are not used
> in ARM mode, there should be no need to synthesize a branch to them.
Ah, yes.
> PS. This patch will not be applied to the sources since the correct
> thing to do is to fix this problem in the linker.
Do you know if someone is really working on it ;-) ? Is there something I
could do for it (no, I'm not familiar with binutils/gcc internals)?
On Thu, Jul 29, 2004 at 05:04:58PM +0100, Nick Clifton wrote:
> Hi Sami,
>
> oops - the previous version of the patch forgot to allow for the
> increased length of the call insns. Please try this version instead.
Thanks, I'll try.
-sk