This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A instrustion question about ARM
- From: Momchil Velikov <velco at fadata dot bg>
- To: "Martin Bian" <martin at utstar dot com>
- Cc: "binutils at sources dot redhat dot com <binutils at sources dot redhat dot com> <binutils at sources dot redhat dot com" <binutils at sources dot redhat dot com>
- Date: 22 Oct 2002 09:38:16 +0300
- Subject: Re: A instrustion question about ARM
- References: <200210220157.g9M1v4Y26300@tiger.utstar.com.cn>
>>>>> "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