This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
"Put an instruction into a specified location"
- To: binutils at sources dot redhat dot com
- Subject: "Put an instruction into a specified location"
- From: xinant at cognigine dot com (Xinan Tang)
- Date: Wed, 16 May 2001 09:35:50 -0700
- Organization: Cognigine Corporation
Hi
Yesterday I asked the question of "how to put an instruction
into a specified location?" The answer I received is to use
.org directive.
However, that is not what I want. What I really want is to
generate such equivalent infortion at runtime, i.e., assume no
such .org directive in the source code.
For example, suppose there are such `strange' instructions:
1: @0x20, MOV R1, 0x1000
2: @0x40, ADD R1, R2, R3
The address after the symbol @ is the address that the corresponding
instruction is supposed to go. Now, how to generate such relocation
infortion when the instruction is parsed? I guess Fixups might be
helpful?
Furthermore, there is `gap' between these two instructions
(0x40-0x20=0x20)
How can I dump such `non-continuous' but `neighbour' two instructions?
Thanks
--
Dr. Xinan Tang Member of Technical Staff
EMail: xinant@cognigine.com Cognigine Corp.
Voice: 510.743.4930 6120 Stevenson Boulevard
Fax: 510.743.4910 Fremont, CA 94538