From 88f4b6929c26f9240a4b0b7dcc62922f02544a09 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 18 Oct 2022 17:00:07 +0200 Subject: Introduce , extracted from This allows us to define a generic no-op version of PTR_MANGLE and PTR_DEMANGLE. In the future, we can use PTR_MANGLE and PTR_DEMANGLE unconditionally in C sources, avoiding an unintended loss of hardening due to missing include files or unlucky header inclusion ordering. In i386 and x86_64, we can avoid a dependency in the C code by using the computed constant from . no longer includes these definitions, so there is no cyclic dependency anymore when computing the constants. Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/nios2/sysdep.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'sysdeps/unix/sysv/linux/nios2/sysdep.h') diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep.h b/sysdeps/unix/sysv/linux/nios2/sysdep.h index 5fe960c2a5..46667b9c19 100644 --- a/sysdeps/unix/sysv/linux/nios2/sysdep.h +++ b/sysdeps/unix/sysv/linux/nios2/sysdep.h @@ -220,21 +220,4 @@ #endif /* __ASSEMBLER__ */ -/* Pointer mangling support. */ -#if IS_IN (rtld) -/* We cannot use the thread descriptor because in ld.so we use setjmp - earlier than the descriptor is initialized. */ -#else -# ifdef __ASSEMBLER__ -# define PTR_MANGLE_GUARD(guard) ldw guard, POINTER_GUARD(r23) -# define PTR_MANGLE(dst, src, guard) xor dst, src, guard -# define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard) -# else -# define PTR_MANGLE(var) \ - (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) -# endif -#endif - - #endif /* linux/nios2/sysdep.h */ -- cgit 1.4.1