From: Matt Turner <[email protected]>

libunwind's unw_is_signal_frame() reads the trampoline as 32-bit words,
but __kernel_sigreturn is only 2-byte aligned. Align both trampolines
to 4 bytes, as the kernel's vsyscall-sigreturn.S does (with .balign 32).

Signed-off-by: Matt Turner <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Helge Deller <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
(cherry picked from commit 95e14595d398d0044ec8b03ffcf1459dc157a69f)
Signed-off-by: Michael Tokarev <[email protected]>

diff --git a/linux-user/sh4/vdso-be.so b/linux-user/sh4/vdso-be.so
index df9fa22efab..d74a2d78e86 100755
Binary files a/linux-user/sh4/vdso-be.so and b/linux-user/sh4/vdso-be.so differ
diff --git a/linux-user/sh4/vdso-le.so b/linux-user/sh4/vdso-le.so
index decd6742022..a59c9e5244d 100755
Binary files a/linux-user/sh4/vdso-le.so and b/linux-user/sh4/vdso-le.so differ
diff --git a/linux-user/sh4/vdso.S b/linux-user/sh4/vdso.S
index 290eb498aeb..a66cac7439a 100644
--- a/linux-user/sh4/vdso.S
+++ b/linux-user/sh4/vdso.S
@@ -135,6 +135,7 @@ vdso_syscall __vdso_gettimeofday, __NR_gettimeofday
        .cfi_offset             24, SC_FPSCR
 
        nop
+       .balign 4
 
 sigreturn_region_start:
 __kernel_sigreturn:
@@ -144,6 +145,7 @@ endf __kernel_sigreturn
        /* rt_sigreturn frame layout; nop for the same reason as above. */
        .cfi_def_cfa_offset     RT_SIGFRAME_SC_OFFSET
        nop
+       .balign 4
 
 __kernel_rt_sigreturn:
        sigreturn_tramp __NR_rt_sigreturn
-- 
2.47.3


Reply via email to