diff options
author | Daniel Cederman <cederman@gaisler.com> | 2024-01-16 09:31:41 +0100 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-02-02 09:49:30 -0300 |
commit | 0c5e5bace57578ed3e28eb89ee2d2b31b74c4ecc (patch) | |
tree | 6f2db67ae5041b609ceffe0c06d9150760f85727 /sysdeps/unix | |
parent | aac57faf5425b472a72132b09f4b3a2aa1f77a63 (diff) | |
download | glibc-0c5e5bace57578ed3e28eb89ee2d2b31b74c4ecc.tar glibc-0c5e5bace57578ed3e28eb89ee2d2b31b74c4ecc.tar.gz glibc-0c5e5bace57578ed3e28eb89ee2d2b31b74c4ecc.tar.bz2 glibc-0c5e5bace57578ed3e28eb89ee2d2b31b74c4ecc.zip |
sparc: Remove unwind information from signal return stubs [BZ #31244]
The functions were previously written in C, but were not compiled
with unwind information. The ENTRY/END macros includes .cfi_startproc
and .cfi_endproc which adds unwind information. This caused the
tests cleanup-8 and cleanup-10 in the GCC testsuite to fail.
This patch adds a version of the ENTRY/END macros without the
CFI instructions that can be used instead.
sigaction registers a restorer address that is located two instructions
before the stub function. This patch adds a two instruction padding to
avoid that the unwinder accesses the unwind information from the function
that the linker has placed right before it in memory. This fixes an issue
with pthread_cancel that caused tst-mutex8-static (and other tests) to fail.
Signed-off-by: Daniel Cederman <cederman@gaisler.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 7bd06985c0a143cdcba2762bfe020e53514a53de)
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S b/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S index cf509c8d5c..1962f9053c 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S @@ -23,12 +23,15 @@ [1] https://lkml.org/lkml/2016/5/27/465 */ -ENTRY (__rt_sigreturn_stub) + nop + nop + +ENTRY_NOCFI (__rt_sigreturn_stub) mov __NR_rt_sigreturn, %g1 ta 0x10 -END (__rt_sigreturn_stub) +END_NOCFI (__rt_sigreturn_stub) -ENTRY (__sigreturn_stub) +ENTRY_NOCFI (__sigreturn_stub) mov __NR_sigreturn, %g1 ta 0x10 -END (__sigreturn_stub) +END_NOCFI (__sigreturn_stub) |