MSVC hook function prologue

Paolo Bonzini bonzini@gnu.org
Mon Sep 7 11:11:00 GMT 2009


On 09/06/2009 11:15 AM, Stefan Dösinger wrote:
> 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.

The naked attribute has been proposed and bashed to death multiple times 
on the GCC list too.

Paolo



More information about the Gcc mailing list