"Instruction being put into a sepcified location"

Nick Clifton nickc@cambridge.redhat.com
Wed May 16 03:45:00 GMT 2001


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



More information about the Binutils mailing list