[llvm-commits] [PATCH] Start of support for __attribute__((ms_hook_prologue))

Charles Davis cdavis at mymail.mines.edu
Sun Oct 24 18:43:27 PDT 2010


Hi,

I thought that, while I wait for a response to my latest clang "patch"
on cfe-dev, I'd work on something else Wine-related.

Microsoft's compiler has a switch, '/hotpatch', that inserts a magic
sequence in the beginning of every compiled function. This sequence lets
other DLLs hook these functions (assuming they were exported from a DLL)
to do interesting things when they're called. In response, GCC added an
attribute, 'ms_hook_prologue', that does the same in GCC (partially at
the behest of the Wine developers). And now I intend to do the same for
Clang.

Of course, this needs backend support. So, as with my
'force_align_arg_pointer' patches, I'm starting with the basics. This
patch adds support for the attribute in LLVM IR. OK to commit?

Chip
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hookprologue-support.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101024/9d097871/attachment.ksh>


More information about the llvm-commits mailing list