[PATCH][ARM] ADR/ADRL insns broken

Richard Earnshaw rearnsha@arm.com
Wed Mar 18 15:06:00 GMT 2009


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.



More information about the Binutils mailing list