[PATCH][ARM] ADR/ADRL insns broken
Andrew Stubbs
ams@codesourcery.com
Wed Mar 18 14:11:00 GMT 2009
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?
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adr.patch
Type: text/x-diff
Size: 3176 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090318/9b931efb/attachment.bin>
More information about the Binutils
mailing list