This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM pc-relative loads
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 01 Jun 2011 19:12:29 +0100
- Subject: Re: ARM pc-relative loads
- References: <201105311510.22735.paul@codesourcery.com>
Paul Brook <paul@codesourcery.com> writes:
> The patch below fixes a failure observed building a hacked-up variant of the
> linux kernel.
>
> The assembler is failing to resolve a pc-relative Thumb load from a global
> symbol in the same section. My first guess was that this is a feature -
> symbol preemption requires the address be resolved at dynamic link time.
> However the offset range of pc-relative load instructions is sufficiently
> small that I don't believe that symbol preemption would ever actually succeed
> in practice.
>
> We already resolve the equivalent ARM relocation. Arguably this is a bug.
> However there is code that relies on this behavior. Given the uselessness of
> exporting these relocations I've chosen to go for consistency with ARM LDR,
> and resolve the relocation. Further investigation revealed a handful of other
> load instructions that also need to be handled.
FWIW, just to add to Richard's response, he explicitly rejected the change
in this thread:
http://sources.redhat.com/ml/binutils/2011-02/msg00398.html
http://sources.redhat.com/ml/binutils/2011-03/msg00019.html
Richard