http://bugs.winehq.org/show_bug.cgi?id=30001
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #3 from Stefan Dösinger stefan@codeweavers.com 2012-03-08 16:12:12 CST --- A random note about that hotpatching thing: When I implemented this feature in gcc I was lazy and only implemented the 5 bytes after the function start. However, Microsoft's documentation says that 5 bytes right before the function should be kept free(nops or int 3s). The MS idea is to replace the 2 byte nop right at the start of the function(mov %edi, %edi) with a relative jump into those 5 bytes, and put the far jump into those 5 bytes. Interestingly all games replace the first 5 bytes behind the function entrypoint instead of following Microsoft's intention.
The main reason why I didn't implement those 5 nop bytes was that I'd have to change gcc's alignment code, making this a trickier task than the part inside the function.