This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] ARM support for long calls
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Christophe LYON <christophe dot lyon at st dot com>
- Date: Tue, 1 Apr 2008 15:10:44 +0100
- Subject: Re: [patch] ARM support for long calls
- References: <47F1051A.3030107@st.com>
On Monday 31 March 2008, Christophe LYON wrote:
> Hello,
>
> So far GNU ld for ARM does not support automatic generation of stubs to
> handle long calls (+/- 32Mb in ARM mode, +/- 4Mb in Thumb mode).
>
> I propose the attached patch to add this support, heavily derived from
> the existing HPPA code.
There are several issues with this implementation:
- ARMv4t arm->thumb interworking is broken (You have to use bx to switch
modes, ldr pc does not work). You also get stray __foo_from_arm symbols
- ARMv4t thumb->arm interworking is broken. It generates blx instructions,
which arm ARMv5 only.
- You can't use ARM code unless the object already does so (it won't work on M
profile devices).
- You aren't obeying --pic-veneer
- Mapping symbols for long call veneers are incorrect.
- Thumb-2 b.w calling a far away arm function is silently generates broken
code.
- BE8 mode is broken.
Paul