- https://web.archive.org/web/20060108072152/http://linux.a386...
- https://web.archive.org/web/20060111133928/http://a386.nocre...
You can also abuse the displacement math with eiz:
ff 34 24 push DWORD PTR [esp]
ff 34 e4 push DWORD PTR [esp+eiz*8]
Or some useless prefixes may work: 80 c0 53 add al,0x53
36 04 53 ss add al,0x53What’s eiz: https://stackoverflow.com/a/2553556/3125367
lea rax, [eiz+rbx*4]
instead of lea rax, [rbx*4]
because the latter will produce an heavier binary by being interpreted as lea rax, [00000000h+rbx*4]This appears to be some GNU-specific syntax meaning "encode SIB byte with no index register". The only case where this would be required by the hardware is when using ESP/RSP as a base register, and every assembler should produce the correct encoding for that if you simply write [ESP].
So using "eiz" on GAS lets you control what is put into the (unused) scale field. One might call that a feature, but it is a meaningless encoding detail similar to which variant of "register to register" opcodes is emitted, something that I don't think any assembler gives you control over.
¹ except maybe on the microarchitectural level, but that isn't visible to the programmer
So each rotation instruction is 3 bits free for out-of-band information.
“Golden Images” are often used to try to counter exploits hidden in the binaries of cloud images used by containers, etc