32-bit hotpatching question

Stefan Dösinger stefandoesinger at gmail.com
Sun Jun 7 04:47:41 CDT 2020


Hi,

> In essence the question is, if MSVC /hotpatch or GCC 
> __ms_hook_prologue__ was supported in LLVM, would it be fine if it 
> generated “66 90 XCHG ax, ax”?
Wine itself does not depend on it at all, we don't hotpatch our own
code. Windows applications like Steam might depend on it though, and I
can't give you a certain answer for all of them.

Check the nop opcode in Windows DLLs. If Microsoft's kernel32.dll
switched to 66 90 we're safe to switch too. If they still use 8b ff we
probably should stick to that.

Steam checks which instructions it replaces, and if it doesn't know 66
90 it will stop patching, breaking the in-game overlay in 32 bit games.
Other applications like FRAPS don't care what they replace, as long as
they can move the first 5 bytes elsewhere.

(Resent to the list because I forgot to CC the list in the previous mail)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200607/b6bd93ca/attachment.sig>


More information about the wine-devel mailing list