This is the mail archive of the binutils@sourceware.org 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: [patch] ARM support for long calls


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


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