Alexandre Julliard : msvcrt: Avoid truncated relocations on 64-bit.

Alexandre Julliard julliard at winehq.org
Fri Dec 12 07:04:08 CST 2008


Module: wine
Branch: master
Commit: 1e8290ded32583ba8872c22408f3a2588f5ecd17
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1e8290ded32583ba8872c22408f3a2588f5ecd17

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 12 00:05:07 2008 +0100

msvcrt: Avoid truncated relocations on 64-bit.

---

 dlls/msvcrt/cpp.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c
index a8687e3..6bc6d3d 100644
--- a/dlls/msvcrt/cpp.c
+++ b/dlls/msvcrt/cpp.c
@@ -624,6 +624,22 @@ void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int fl
 
 /* vtables */
 
+#ifdef _WIN64
+
+#define __ASM_VTABLE(name,funcs) \
+    __asm__(".data\n" \
+            "\t.align 8\n" \
+            "\t.quad " __ASM_NAME(#name "_rtti") "\n" \
+            "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \
+            __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \
+            "\t.quad " THISCALL_NAME(MSVCRT_ ## name ## _vector_dtor) "\n" \
+            funcs "\n\t.text");
+
+#define __ASM_EXCEPTION_VTABLE(name) \
+    __ASM_VTABLE(name, "\t.quad " THISCALL_NAME(MSVCRT_what_exception) )
+
+#else
+
 #define __ASM_VTABLE(name,funcs) \
     __asm__(".data\n" \
             "\t.align 4\n" \
@@ -636,6 +652,8 @@ void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int fl
 #define __ASM_EXCEPTION_VTABLE(name) \
     __ASM_VTABLE(name, "\t.long " THISCALL_NAME(MSVCRT_what_exception) )
 
+#endif /* _WIN64 */
+
 #ifndef __GNUC__
 void __asm_dummy_vtables(void) {
 #endif




More information about the wine-cvs mailing list