Assembler question: how to force "jmp rel32"

Lonnie Princehouse lonnie.princehouse@gmail.com
Sat Mar 15 22:13:00 GMT 2008


Hello all,

I'm having trouble with the GNU assembler.  It's because of this:

"Jump instructions are always optimized to use the smallest possible
displacements."

I want labels to always be interpreted as 32-bit displacement operands
for jmp (i.e., opcode E9), even if they would fit in 8 bits (opcode
EB).  Does anyone know if it's possible to force the assembler to do
this?  I'm using AT&T syntax but can switch to Intel if necessary.

(I'm doing some assembly rewriting that is very sensitive to
instruction lengths.)

Thanks very much!



More information about the Binutils mailing list