This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add support for the Win32 hook prologue (try 3)
Am Saturday 12 September 2009 07:57:46 schrieb Richard Henderson:
> On 09/11/2009 04:23 PM, Stefan Dösinger wrote:
> > What stops me from dumping the 5 NOPs, then going through the usual
> > ASM_OUTPUT_ALIGN and ASM_OUTPUT_MAX_SKIP_ALIGN? What extra logic has to
> > be applied that 3 separate functions can't do?
>
> Because those aligns will emit multi-byte nops. If we've decided that
> only 0x90 and 0xcc are to be allowed in the filler space, you can't use
> those.
Can a special function fix this?
My understanding is that gcc doesn't know about the exact byte position, as it
only outputs assembler statements. As such, any special alignment function
can only output a ".align X" statements, which will lead to the same final
result.
I don't ming if there's some other multi-byte nop right now, as I don't know
any app that depends on this. If there's an easy way to make sure there are
0x90 nops it'd be nice to have though.