sparc: Remove unwind information from signal return stubs [BZ #31244]
commit7bd06985c0a143cdcba2762bfe020e53514a53de
authorDaniel Cederman <cederman@gaisler.com>
Tue, 16 Jan 2024 08:31:41 +0000 (16 09:31 +0100)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 18 Jan 2024 11:27:44 +0000 (18 08:27 -0300)
treedf2364326971944c515146967cb637d482fb6b12
parent82a35070ec35616074343b8c4ffe6b1cff7e2793
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>
sysdeps/sparc/sysdep.h
sysdeps/unix/sysv/linux/sparc/sparc32/sigreturn_stub.S