This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][ARM] ADR/ADRL insns broken
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 18 Mar 2009 15:06:28 +0000
- Subject: Re: [PATCH][ARM] ADR/ADRL insns broken
- References: <49C100FE.3050803@codesourcery.com>
On Wed, 2009-03-18 at 14:11 +0000, Andrew Stubbs wrote:
> The problem is that the ADR and ADRL should not accept operands in
> another section, but they do.
>
> This patch adds a new test. It does not change assembler output for
> correct code.
>
> Example:
>
> .text
> start:
> adr r0, var
>
> .data
> .globl var
> var:
> .word 0x00000000
>
> Before the patch, the assembler mis-assembles the code and puts in a
> constant offset of -8, which is probably just the PC adjustment.
>
> After the patch, the assembler gives the following message:
>
> t.s: Assembler messages:
> t.s:3: Error: symbol var is in a different section
>
> The ADRL instruction is similarly adjusted. This instruction also failed
> to check that the symbol was defined. I've copied the code from the ADR
> instruction to fix this.
>
> OK?
Yes, fine thanks.
R.