wanted: relocation for each field of instruction
Daniel Jacobowitz
drow@false.org
Sat Mar 7 02:04:00 GMT 2009
On Fri, Mar 06, 2009 at 02:54:07PM -0800, Ian Lance Taylor wrote:
> Anyhow, given ELF, there are two possible approaches. One is the one
> you mention: define a set of new relocations, like THUMB_SHIFT, enough
> to let you do whatever you need. The other is to define a set of
> relocations which permit arbitrary expression evaluation. For example,
> Alpha ECOFF implemented a limited form of this.
>
> * ALPHA_R_OP_PUSH pushes the addend on the relocation stack.
> * ALPHA_R_OP_STORE stores the top of the stack into the instruction at
> the reloc address; the addend defines the bitfield where the
> instruction is stored. This is also pops the stack.
> * ALPHA_R_OP_PSUB subtracts the addend from the top of the stack.
> * ALPHA_R_OP_PRSHIFT shifts the top of the stack right by the addend.
Isn't there generic machinery for something like this in binutils now,
which was contributed for MEP?
--
Daniel Jacobowitz
CodeSourcery
More information about the Binutils
mailing list