This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: "Instruction being put into a sepcified location"
- To: xinant at cognigine dot com (Xinan Tang)
- Subject: Re: "Instruction being put into a sepcified location"
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: 16 May 2001 12:44:20 +0100
- Cc: binutils at sources dot redhat dot com
- References: <3B01D03D.7080104@cognigine.com>
Hi Xinan,
> How to put an instruction into a specified location (within a .text)?
>
> For example, if I want to put the following instruction,
>
> .text
> ...
> MOV R0, 0x2000
>
> into the memory location (.text + 0x20), i.e., the 0x20th location
> in the text section. How can I do this using Fixups or Frags?
You can use the .org directive. For example:
.text
....
.org .text + 0x20
MOV R0, 0x2000
Cheers
Nick