ARM long branch stub: pic
Daniel Jacobowitz
drow@false.org
Wed Feb 18 16:27:00 GMT 2009
On Wed, Feb 18, 2009 at 04:22:21PM +0100, Christophe LYON wrote:
> Hello,
>
> There is a bug when computing the target of a long branch stub in PIC
> mode (it jumps 4 bytes too far). I propose the attached patch.
>
> Note that the current PIC stub is not correct (it uses a target address
> rather than an offset), I will send a separate patch for this later.
I don't understand - it looks like an offset to me. I'll wait to see
your next patch.
> 2009-02-04 Christophe Lyon <christophe.lyon@st.com>
>
> bfd/
> * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
> stub. Catch default case error.
> (arm_map_one_stub): Add missing Thumb mapping symbol.
>
> testsuite/
> * ld-arm/farcall-arm-arm-pic-veneer.d,
> ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
> ld-arm/farcall-arm-thumb-pic-veneer.d,
> ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
> ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Fix expected stub
> target.
This is OK. Please change "R_ARM_REL32(X)" to "R_ARM_REL32(X-4)" in
the comment in the stub.
--
Daniel Jacobowitz
CodeSourcery
More information about the Binutils
mailing list