This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Re: A instrustion question about ARM
- From: "Martin Bian" <martin at utstar dot com>
- To: Momchil Velikov <velco at fadata dot bg>
- 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 <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: Tue, 22 Oct 2002 14:59:45 +0800
- Subject: Re: Re: A instrustion question about ARM
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