diff options
author | Daniel Cederman <cederman@gaisler.com> | 2024-01-16 09:31:41 +0100 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-18 08:27:44 -0300 |
commit | 7bd06985c0a143cdcba2762bfe020e53514a53de (patch) | |
tree | df2364326971944c515146967cb637d482fb6b12 /sysdeps/sparc | |
parent | 82a35070ec35616074343b8c4ffe6b1cff7e2793 (diff) | |
download | glibc-7bd06985c0a143cdcba2762bfe020e53514a53de.zip glibc-7bd06985c0a143cdcba2762bfe020e53514a53de.tar.gz glibc-7bd06985c0a143cdcba2762bfe020e53514a53de.tar.bz2 |
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>
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r-- | sysdeps/sparc/sysdep.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/sparc/sysdep.h b/sysdeps/sparc/sysdep.h index c00fe79..44a6952 100644 --- a/sysdeps/sparc/sysdep.h +++ b/sysdeps/sparc/sysdep.h @@ -76,6 +76,15 @@ C_LABEL(name) \ cfi_endproc; \ .size name, . - name +#define ENTRY_NOCFI(name) \ + .align 4; \ + .global C_SYMBOL_NAME(name); \ + .type name, @function; \ +C_LABEL(name) + +#define END_NOCFI(name) \ + .size name, . - name + #undef LOC #define LOC(name) .L##name |