Commit 1e8290de authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Avoid truncated relocations on 64-bit.

parent 82bd6f1e
...@@ -624,6 +624,22 @@ void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int fl ...@@ -624,6 +624,22 @@ void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int fl
/* vtables */ /* 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) \ #define __ASM_VTABLE(name,funcs) \
__asm__(".data\n" \ __asm__(".data\n" \
"\t.align 4\n" \ "\t.align 4\n" \
...@@ -636,6 +652,8 @@ void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int fl ...@@ -636,6 +652,8 @@ void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int fl
#define __ASM_EXCEPTION_VTABLE(name) \ #define __ASM_EXCEPTION_VTABLE(name) \
__ASM_VTABLE(name, "\t.long " THISCALL_NAME(MSVCRT_what_exception) ) __ASM_VTABLE(name, "\t.long " THISCALL_NAME(MSVCRT_what_exception) )
#endif /* _WIN64 */
#ifndef __GNUC__ #ifndef __GNUC__
void __asm_dummy_vtables(void) { void __asm_dummy_vtables(void) {
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment