This is the mail archive of the
mailing list for the GCC project.
Re: MSVC hook function prologue
- From: Stefan Dösinger <stefan at codeweavers dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Ross Ridge <rridge at csclub dot uwaterloo dot ca>
- Date: Sun, 6 Sep 2009 11:15:54 +0200
- Subject: Re: MSVC hook function prologue
- References: <20090905150819.E23CA73F6A@caffeine.csclub.uwaterloo.ca>
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