Rémi Bernon rbernon@codeweavers.com writes:
On 2020-06-24 09:13, Alexandre Julliard wrote:
Rémi Bernon rbernon@codeweavers.com writes:
CoD: Black Ops 3 and CoD: WWII modify these (and several others) and expect to have enough space for a few instructions.
It then verifies later that the patches are still in place, and terminates if the byte sequence do not match. Having small symbols can make the patches to overlap and the check to fail.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
v2: Use .skip instead of .nops which doesn't work with old binutils, also fix the size on x86_64.
Is .skip truly portable? In winebuild we had to avoid it on macOS because it wasn't supported, I don't know if that's still true.
To be honest I have no idea, I guess I could send another version with .space instead, as it seems to be used in winebuild on macOS, and to be equivalent according to GNU as manual (except for HPPA targets, but that should not be of concern).
A bunch of explicit nops or int3 may be easier...