Ken Thomases : msvcrt: Fix vtable alignment on macOS and certain non-x86 architectures.

Alexandre Julliard julliard at winehq.org
Mon Mar 18 16:20:16 CDT 2019


Module: wine
Branch: master
Commit: d22058d1cb399af1b2fbec371671cd716e957aa0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d22058d1cb399af1b2fbec371671cd716e957aa0

Author: Ken Thomases <ken at codeweavers.com>
Date:   Mon Mar 18 14:21:55 2019 -0500

msvcrt: Fix vtable alignment on macOS and certain non-x86 architectures.

On some platforms and architectures, the .align <n> directive aligns to 2^n
bytes, not n bytes.  The .balign <n> directive always aligns to n bytes.

Signed-off-by: Ken Thomases <ken at codeweavers.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/cxx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/cxx.h b/dlls/msvcrt/cxx.h
index 027026e..3765dc8 100644
--- a/dlls/msvcrt/cxx.h
+++ b/dlls/msvcrt/cxx.h
@@ -44,7 +44,7 @@
 
 #define __ASM_VTABLE(name,funcs) \
     __asm__(".data\n" \
-            "\t.align 8\n" \
+            "\t.balign 8\n" \
             "\t.quad " __ASM_NAME(#name "_rtti") "\n" \
             "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \
             __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \
@@ -56,7 +56,7 @@
 
 #define __ASM_VTABLE(name,funcs) \
     __asm__(".data\n" \
-            "\t.align 4\n" \
+            "\t.balign 4\n" \
             "\t.long " __ASM_NAME(#name "_rtti") "\n" \
             "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \
             __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \




More information about the wine-cvs mailing list