This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] Arm v4t Thumb shared libraries.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 18 Aug 2006 09:49:39 +0100
- Subject: Re: [patch] Arm v4t Thumb shared libraries.
- References: <200608172236.22349.paul@codesourcery.com>
On Thu, 2006-08-17 at 22:36, Paul Brook wrote:
> The current arm-linux PLT sequence ends with the equivalent of
>
> ldr pc, [ip]
>
> This sequence is not interworking safe on armv4t hardware. To enable use of
> Thumb in shared libraries there are two options:
>
> a) Use a new PLT sequence. Because we only have one scratch register and the
> requirements of the lazy resolver this means doubling the size of all PLT,
> entries and probably breaks prelinking.
>
> b) Make sure that all functions exported from shared libraries are entered in
> Arm mode, inserting stubs as neccessary, thus avoiding the whole issue. This
> also means that prelinking and applications which do not use Thumb are
> uneffected.
>
> The attached patch implements (b). It reuses the existing infrastructure for
> generating arm->thumb stubs.
>
> Ok?
Cool!
Yes, this is fine, except that i would add a comment here:
+ if (globals->use_blx)
+ return;
explaining why we can take that shortcut.
R.