[PATCH] Fix thumb calls via PLT on ARM/SymbianOS

Julian Brown julian@codesourcery.com
Wed Mar 16 14:52:00 GMT 2005


Hi,

This patch fixes calls made from thumb mode via the PLT on SymbianOS. 
PLT entries are written in ARM mode, but previously they were being 
called in thumb mode, with their address incorrectly offset by -4 
(PLT_THUMB_STUB_SIZE).

Now, the target address has been corrected and the thumb BL instruction 
is rewritten as BLX to perform the mode switch before attempting to 
execute the PLT entry. (BLX is an armv5t instruction, but as SymbianOS 
is only targeted at armv5t+, this should always be OK.)

The hardwired "4" for the thumb stub size on non-SymbianOS targets has 
also been rewritten as PLT_THUMB_STUB_SIZE.

OK to apply?

Julian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-3
URL: <https://sourceware.org/pipermail/binutils/attachments/20050316/36acb714/attachment.ksh>


More information about the Binutils mailing list