aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-10-18 17:00:07 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-10-18 17:04:10 +0200
commit58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec (patch)
tree0aea307f4cf761952fbdf15fd67fc3b09b43707c /sysdeps/s390
parent88f4b6929c26f9240a4b0b7dcc62922f02544a09 (diff)
downloadglibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.zip
glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.gz
glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.bz2
Use PTR_MANGLE and PTR_DEMANGLE unconditionally in C sources
In the future, this will result in a compilation failure if the macros are unexpectedly undefined (due to header inclusion ordering or header inclusion missing altogether). Assembler sources are more difficult to convert. In many cases, they are hand-optimized for the mangling and no-mangling variants, which is why they are not converted. sysdeps/s390/s390-32/__longjmp.c and sysdeps/s390/s390-64/__longjmp.c are special: These are C sources, but most of the implementation is in assembler, so the PTR_DEMANGLE macro has to be undefined in some cases, to match the assembler style. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/jmpbuf-unwind.h2
-rw-r--r--sysdeps/s390/s390-32/__longjmp.c5
-rw-r--r--sysdeps/s390/s390-64/__longjmp.c5
3 files changed, 10 insertions, 2 deletions
diff --git a/sysdeps/s390/jmpbuf-unwind.h b/sysdeps/s390/jmpbuf-unwind.h
index 10b37f0..d125f31 100644
--- a/sysdeps/s390/jmpbuf-unwind.h
+++ b/sysdeps/s390/jmpbuf-unwind.h
@@ -41,9 +41,7 @@ static inline uintptr_t __attribute__ ((unused))
_jmpbuf_sp (__jmp_buf regs)
{
void *sp = (void *) (uintptr_t) regs[0].__gregs[__JB_GPR15];
-#ifdef PTR_DEMANGLE
PTR_DEMANGLE (sp);
-#endif
return (uintptr_t) sp;
}
diff --git a/sysdeps/s390/s390-32/__longjmp.c b/sysdeps/s390/s390-32/__longjmp.c
index 83d4232..f0317f6 100644
--- a/sysdeps/s390/s390-32/__longjmp.c
+++ b/sysdeps/s390/s390-32/__longjmp.c
@@ -24,6 +24,11 @@
#include <unistd.h>
#include <stap-probe.h>
+/* See sysdeps/unix/sysv/linux/s390/s390-32/pointer_guard.h. */
+#if IS_IN (rtld)
+# undef PTR_DEMANGLE
+#endif
+
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
void
diff --git a/sysdeps/s390/s390-64/__longjmp.c b/sysdeps/s390/s390-64/__longjmp.c
index 9fe4939..eabe245 100644
--- a/sysdeps/s390/s390-64/__longjmp.c
+++ b/sysdeps/s390/s390-64/__longjmp.c
@@ -24,6 +24,11 @@
#include <unistd.h>
#include <stap-probe.h>
+/* See sysdeps/unix/sysv/linux/s390/s390-64/pointer_guard.h. */
+#if IS_IN (rtld)
+# undef PTR_DEMANGLE
+#endif
+
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
void