-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Please add support for ms_hook_prologue function attribute #10584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sorry, hit tab one to many times before hitting Submit :) gcc added support for this a couple years ago (Sep 2009), and has been in since gcc 4.5. It's used by Wine to allow programs to hook certain APIs. Without this, Steam, xfire, and several copy protections/DRM schemes fail to function. |
Still present, as of |
I just noticed Clang already abstracts this on the CGCXXABI object (EmitInstanceFunctionProlog), so it should be pretty to hook it up on the compiler once the LLVM part is done. |
Instance functions aren't the only ones which would want this prologue. This is most commonly used on non-instance methods and corresponds to the /hotpatch MSVC option: http://msdn.microsoft.com/en-us/library/ms173507.aspx What's more, it's not x86-specific (we should support it for x64 and Itanium targets as well, where it can require more than just the five-byte prologue). For MSVC compatibility, we should consider adding a flag letting you turn this feature on or off for an entire file instead of requiring an attribute. Not saying that we shouldn't also support the function attribute. |
*** Bug llvm/llvm-bugzilla-archive#20888 has been marked as a duplicate of this bug. *** |
Any progress? |
This feature was temporarily added in August 2016, then reverted almost immediately thereafter:
|
mentioned in issue llvm/llvm-bugzilla-archive#10638 |
mentioned in issue llvm/llvm-bugzilla-archive#20888 |
mentioned in issue #7187 |
Hope this gets fixed soon so that it can be utilized when compiling Wine :/ |
This seems far more likely now that Clang supports |
The text was updated successfully, but these errors were encountered: