From c272f67f9fc4c354336241ef4f3876771ccab443 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 20 May 2013 10:19:31 +0200 Subject: [PATCH] AArch64: Don't clobber argument for tail call to __sigjmp_save in sigsetjmp [BZ #15493] * sysdeps/aarch64/setjmp.S (__sigsetjmp): Don't clobber register x1. [NOT_IN_libc && IS_IN_rtld]: Don't call __sigjmp_save. --- ports/sysdeps/aarch64/setjmp.S | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/sysdeps/aarch64/setjmp.S b/ports/sysdeps/aarch64/setjmp.S index cff81c7..10e0709 100644 --- a/ports/sysdeps/aarch64/setjmp.S +++ b/ports/sysdeps/aarch64/setjmp.S @@ -44,8 +44,14 @@ ENTRY (__sigsetjmp) stp d10, d11, [x0, #JB_D10<<3] stp d12, d13, [x0, #JB_D12<<3] stp d14, d15, [x0, #JB_D14<<3] - mov x1, sp - str x1, [x0, #JB_SP<<3] + mov x2, sp + str x2, [x0, #JB_SP<<3] +#if defined NOT_IN_libc && defined IS_IN_rtld + /* In ld.so we never save the signal mask */ + mov w0, #0 + RET +#else b C_SYMBOL_NAME(__sigjmp_save) +#endif END (__sigsetjmp) hidden_def (__sigsetjmp) -- 1.8.2.3