A instrustion question about ARM
Martin Bian
martin@utstar.com
Mon Oct 21 23:58:00 GMT 2002
Momchil Velikov,
Thanks your answer.
>>>>>> "Martin" == Martin Bian <martin@utstar.com> writes:
>Martin> I use a ARM v7t chip and write assemble code under arm-elf-gcc.
>Martin> I used a instruction like this:
>Martin> .data
>Martin> label1: .word 0x00
>Martin> ..
>
>Martin> .text
>Martin> ..
>Martin> ldr r0,label1
>
>Martin> when I compiled the source codes, a error was printed out: Error:=
>Martin> Internal_relocation (type 197) not fixed up (OFFSET_IMM)
>
>Martin> Then, I made a little change, I declared the label1 in .text=
>Martin> section.
>Martin> .text
>Martin> label1: .word 0x00
>Martin> ..
>Martin> ldr r0,label1
> ^^^^^^^^^^^^^
>That's a PC-relative load, ``label1'' must be in the same section as
^^^^^^^^^^^^^^^^^^^^^^
>the insn.
^^^^^^^^
I think your are right.
but can you explain why I can use this instruction under ARM SDT?
>
>~velco
Martin Bian
More information about the Binutils
mailing list