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 v4t Thumb shared libraries.


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.


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