diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-10-18 17:00:07 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-10-18 17:04:10 +0200 |
commit | 58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec (patch) | |
tree | 0aea307f4cf761952fbdf15fd67fc3b09b43707c /sysdeps/i386 | |
parent | 88f4b6929c26f9240a4b0b7dcc62922f02544a09 (diff) | |
download | glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.gz glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.xz glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.zip |
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/i386')
-rw-r--r-- | sysdeps/i386/jmpbuf-unwind.h | 2 | ||||
-rw-r--r-- | sysdeps/i386/unwind-arch.h | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/sysdeps/i386/jmpbuf-unwind.h b/sysdeps/i386/jmpbuf-unwind.h index 73d214fd31..25b54f8bb0 100644 --- a/sysdeps/i386/jmpbuf-unwind.h +++ b/sysdeps/i386/jmpbuf-unwind.h @@ -34,9 +34,7 @@ static inline uintptr_t __attribute__ ((unused)) _jmpbuf_sp (__jmp_buf regs) { uintptr_t sp = regs[JB_SP]; -#ifdef PTR_DEMANGLE PTR_DEMANGLE (sp); -#endif return sp; } diff --git a/sysdeps/i386/unwind-arch.h b/sysdeps/i386/unwind-arch.h index ae23469d3f..bb2e878dd0 100644 --- a/sysdeps/i386/unwind-arch.h +++ b/sysdeps/i386/unwind-arch.h @@ -28,12 +28,8 @@ local.ptr__Unwind_GetGR \ = __libc_dlsym (local_libgcc_handle, "_Unwind_GetGR"); \ assert (local.ptr__Unwind_GetGR != NULL); -#ifdef PTR_MANGLE -# define UNWIND_LINK_EXTRA_INIT \ +#define UNWIND_LINK_EXTRA_INIT \ UNWIND_LINK_EXTRA_INIT_SHARED \ PTR_MANGLE (local.ptr__Unwind_GetGR); -#else -# define UNWIND_LINK_EXTRA_INIT UNWIND_LINK_EXTRA_INIT_SHARED -#endif #endif /* _ARCH_UNWIND_LINK_H */ |