A instrustion question about ARM
Momchil Velikov
velco@fadata.bg
Mon Oct 21 23:40:00 GMT 2002
>>>>> "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.
~velco
More information about the Binutils
mailing list