Open llvmbot opened 13 years ago
Bugzilla Link | 10212 |
Version | trunk |
OS | Linux |
Blocks | llvm/llvm-project#7187 llvm/llvm-bugzilla-archive#10638 |
Reporter | LLVM Bugzilla Contributor |
CC | @AaronBallman,@jeremyhu,@tritao,@nlewycky,@zygoloid,@rnk |
mentioned in issue llvm/llvm-project#7187
mentioned in issue llvm/llvm-bugzilla-archive#20888
mentioned in issue llvm/llvm-bugzilla-archive#10638
This feature was temporarily added in August 2016, then reverted almost immediately thereafter:
Any progress?
Bug llvm/llvm-bugzilla-archive#20888 has been marked as a duplicate of this bug.
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.
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.
Still present, as of git-svn-id: http://llvm.org/svn/llvm-project/llvm/trunk@150433 91177308-0d34-0410-b5e6-96231b3b80d8
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.
Hope this gets fixed soon so that it can be utilized when compiling Wine :/ This is a decade-old issue
This seems far more likely now that Clang supports -fms-hotpatch
as a command line argument: https://github.com/llvm/llvm-project/commit/5af2433e1794ebf7e58e848aa612c7912d71dc78. I think it may be a matter of exposing the attribute and checking for it in CodeGenFunction::StartFunction()
, though there would probably be some fit and finish work as well.