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 Friday 11 September 2009 15:58:09 schrieb Pedro Alves:
> ... and the "/FUNCTIONPADMIN[:space]" linker switch:
> <http://msdn.microsoft.com/en-us/library/ms173524(VS.80).aspx>
> "space (optional)
> Too bad this isn't being implemented fully, as it might turn out
> generaly useful, and, I would guess that you may find out later
> at some point some app that also checks if the slack nops are
> there in addition to the prologue sequence with extra 2-byte nop.
I talked to Alexandre, and he prefers the function attrib that generates the
full 5 byte mov-push-mov sequence since it is more reliable.
However, he also wants the ms_hook_prologue to generate the 5 NOPs before the
function, so an app can place a jump there in the way MSFT's hotpatches do,
so I'll look into that. I just wanted to ask, does gcc have any existing
infrastructure for that? Can this be done in gcc alone, or does this involve
changing the linker?