This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ARM] ADR/ADRL insns broken


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]