This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM long branch stub: pic
- From: Daniel Jacobowitz <drow at false dot org>
- To: Christophe LYON <christophe dot lyon at st dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 18 Feb 2009 11:27:07 -0500
- Subject: Re: ARM long branch stub: pic
- References: <499C27AD.5050609@st.com>
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