HomePhabricator

[Attr] Add support for the `ms_hook_prologue` attribute.

Authored by cdavis5x on Aug 8 2016, 2:03 PM.

Description

[Attr] Add support for the ms_hook_prologue attribute.

Summary:
Based on a patch by Michael Mueller.

This attribute specifies that a function can be hooked or patched. This
mechanism was originally devised by Microsoft for hotpatching their
binaries (which they're constantly updating to stay ahead of crackers,
script kiddies, and other ne'er-do-wells on the Internet), but it's now
commonly abused by Windows programs that want to hook API functions. It
is for this reason that this attribute was added to GCC--hence the name,
ms_hook_prologue.

Depends on D19908.

Reviewers: rnk, aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D19909

llvm-svn: 278050

Details

Committed
cdavis5xAug 8 2016, 2:03 PM
Differential Revision
D19909: [Attr] Add support for the `ms_hook_prologue` attribute.
Parents
rG6b4422e6fe22: InstCombine: Remove a redundant #ifdef NDEBUG. NFC
Branches
Unknown
Tags
Unknown