how to embed an arbitrary opcode

Paul Brook paul@codesourcery.com
Fri Jun 19 14:37:00 GMT 2009


> Currently there is no way to achieve the effect you desire.  But all is
> not lost, this being free software and all.  So, please try out the
> attached patch which adds two new pseudo ops to the ARM port of GAS:
>
>    .iword <expression>[,<expression>]*
>    .ishort <expression>[,<expression>]*
>
> which can be used to insert 32-bit and 16-bit values respectively into
> the output stream and mark them as instructions not data.

I'd rather not do it this way. A naive implementation like this ignores many 
of the complications that arise on Thumb-2 targets.

c.f. http://sourceware.org/ml/binutils/2006-11/msg00250.html

Daniel Gutson is currently working on implementing a variant of (2).

Paul



More information about the Binutils mailing list