MSVC hook function prologue
Stefan Dösinger
stefan@codeweavers.com
Sun Sep 6 09:16:00 GMT 2009
Am Saturday 05 September 2009 17:08:19 schrieb Ross Ridge:
> If this patch is essentially only for one application, maybe the idea
> of implementing a more generally useful naked attribute would be the
> way to go. I implemented a naked attribute in my private sources to
> do something similar, although supporting hookable prologues was just
> a small part of its more general use in supporting an assembler based API.
We don't really like the naked attribute, because it makes maintaining a C
function that uses it a pain. Alexandre once said that he would reject any
solution for the hook problem that is based on the naked attribute. This
especially becomes a pain when the function has to do stack realignment, like
all our Win32 functions on OSX.
But yeah, this functionality will probably be used only by Wine, since Linux
and OSX offer more comfortable hooking mechanisms than opcode replacements.
Although you never know, perhaps someone else finds a use for this I did not
anticipate.
More information about the Gcc
mailing list