On Thu Sep 21 05:37:48 2023 +0000, Aidan Khoury wrote:
Relocations are not guaranteed to be aligned. The other PE image structures require unalignment as well for the case that mspatcha compiled as a 64-bit PE image (8-byte alignment default) will be manipulating 32-bit PE image buffers which defaults to 4-byte alignment. I may be wrong about all of this in wine's case, forgive me as I am also not super familiar with GCC's default type alignment. I noticed in dlls/msvcrt/string.c uses unaligned typedefs, so I would have assumed that types are aligned to their own size boundary. Let me know what you think of 6088f31e
I don't think any of the PE structures you're using have 8-byte alignment regardless of host machine. They don't contain pointers.