Alexandre Julliard : ntdll: Add a ret to DEFINE_REGS_ENTRYPOINT to make copy protections happy.
Alexandre Julliard
julliard at winehq.org
Wed Aug 12 11:09:43 CDT 2009
Module: wine
Branch: master
Commit: b46cf438f8366e667c08ef2d5464c08b4c656cb1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b46cf438f8366e667c08ef2d5464c08b4c656cb1
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Aug 12 14:35:43 2009 +0200
ntdll: Add a ret to DEFINE_REGS_ENTRYPOINT to make copy protections happy.
---
dlls/kernel32/kernel_private.h | 3 ++-
dlls/ntdll/ntdll_misc.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h
index 39a5e23..20f6399 100644
--- a/dlls/kernel32/kernel_private.h
+++ b/dlls/kernel32/kernel_private.h
@@ -152,7 +152,8 @@ extern HANDLE get_BaseNamedObjects_handle(void);
".byte 0x68\n\t" /* pushl $__regs_func */ \
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
".byte 0x6a," #args "\n\t" /* pushl $args */ \
- "call " __ASM_NAME("__wine_call_from_32_regs"))
+ "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
+ "ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
#endif
#endif
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index ea2234a..06b5d4c 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -233,7 +233,8 @@ static inline struct ntdll_thread_regs *ntdll_get_thread_regs(void)
".byte 0x68\n\t" /* pushl $__regs_func */ \
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
".byte 0x6a," #args "\n\t" /* pushl $args */ \
- "call " __ASM_NAME("__wine_call_from_32_regs"))
+ "call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
+ "ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
#elif defined(__x86_64__)
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
__ASM_GLOBAL_FUNC( name, \
More information about the wine-cvs
mailing list