[PATCH v2 0/2] MR5937: Fix hotpatch prologue in GetProcAddress().
-- v2: kernelbase: Remove 0x48 prologue from GetProcAddress() on x64. kernel32: Remove 0x48 prologue from GetProcAddress() on x64. https://gitlab.winehq.org/wine/wine/-/merge_requests/5937
From: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/kernel32/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c index ed15e57c29c..85931df57d9 100644 --- a/dlls/kernel32/module.c +++ b/dlls/kernel32/module.c @@ -322,7 +322,6 @@ FARPROC WINAPI __attribute__((naked)) GetProcAddress( HMODULE module, LPCSTR fun } #elif defined(__x86_64__) __ASM_GLOBAL_FUNC( GetProcAddress, - ".byte 0x48\n\t" /* hotpatch prolog */ "pushq %rbp\n\t" __ASM_SEH(".seh_pushreg %rbp\n\t") __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5937
From: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/kernelbase/loader.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/kernelbase/loader.c b/dlls/kernelbase/loader.c index 7afbe0460eb..156ba2d1c46 100644 --- a/dlls/kernelbase/loader.c +++ b/dlls/kernelbase/loader.c @@ -457,7 +457,6 @@ FARPROC WINAPI __attribute__((naked)) GetProcAddress( HMODULE module, LPCSTR fun } #elif defined(__x86_64__) __ASM_GLOBAL_FUNC( GetProcAddress, - ".byte 0x48\n\t" /* hotpatch prolog */ "pushq %rbp\n\t" __ASM_SEH(".seh_pushreg %rbp\n\t") __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5937
v2: - just remove the prologue instead. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5937#note_74592
I was corrected that the lone 0x48 prefix is something which was encountered in a number of Windows functions (to make it possible to patch with 2 byte short jump). So in the absence of anything known to require something else specifically there is no reason to change it, closing. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5937#note_74600
This merge request was closed by Paul Gofman. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5937
participants (2)
-
Paul Gofman -
Paul Gofman (@gofman)