From 4458cc330e6e5b7369151ebe172c00faceb43ade Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 8 Jul 2016 16:01:41 +0200 Subject: cleanup PTR_MANGLE/PTR_DEMANGLE support As this is only implemented for a few architecture and not well tested, just remove it. Reviewed-by: Max Filippov --- libc/sysdeps/linux/x86_64/sched_getcpu.S | 1 - libc/sysdeps/linux/x86_64/sysdep.h | 41 -------------------------------- 2 files changed, 42 deletions(-) (limited to 'libc/sysdeps/linux/x86_64') diff --git a/libc/sysdeps/linux/x86_64/sched_getcpu.S b/libc/sysdeps/linux/x86_64/sched_getcpu.S index f8c09c0f2..1e0a344c7 100644 --- a/libc/sysdeps/linux/x86_64/sched_getcpu.S +++ b/libc/sysdeps/linux/x86_64/sched_getcpu.S @@ -37,7 +37,6 @@ ENTRY (sched_getcpu) #ifdef SHARED movq __vdso_getcpu(%rip), %rax - PTR_DEMANGLE (%rax) callq *%rax #else # ifdef __NR_getcpu diff --git a/libc/sysdeps/linux/x86_64/sysdep.h b/libc/sysdeps/linux/x86_64/sysdep.h index 3bfeaca50..0e5100122 100644 --- a/libc/sysdeps/linux/x86_64/sysdep.h +++ b/libc/sysdeps/linux/x86_64/sysdep.h @@ -286,45 +286,4 @@ lose: \ # define DOARGS_6 DOARGS_5 #endif /* __ASSEMBLER__ */ - - -/* Pointer mangling support. */ -#if defined NOT_IN_libc && defined IS_IN_rtld -/* We cannot use the thread descriptor because in ld.so we use setjmp - earlier than the descriptor is initialized. */ -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg; \ - rolq $17, reg -# define PTR_DEMANGLE(reg) rorq $17, reg; \ - xorq __pointer_chk_guard_local(%rip), reg -# else -# define PTR_MANGLE(reg) __asm__ ("xorq __pointer_chk_guard_local(%%rip), %0\n" \ - "rolq $17, %0" \ - : "=r" (reg) : "0" (reg)) -# define PTR_DEMANGLE(reg) __asm__ ("rorq $17, %0\n" \ - "xorq __pointer_chk_guard_local(%%rip), %0" \ - : "=r" (reg) : "0" (reg)) -# endif -#else -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg; \ - rolq $17, reg -# define PTR_DEMANGLE(reg) rorq $17, reg; \ - xorq %fs:POINTER_GUARD, reg -# else -# define PTR_MANGLE(var) __asm__ ("xorq %%fs:%c2, %0\n" \ - "rolq $17, %0" \ - : "=r" (var) \ - : "0" (var), \ - "i" (offsetof (tcbhead_t, \ - pointer_guard))) -# define PTR_DEMANGLE(var) __asm__ ("rorq $17, %0\n" \ - "xorq %%fs:%c2, %0" \ - : "=r" (var) \ - : "0" (var), \ - "i" (offsetof (tcbhead_t, \ - pointer_guard))) -# endif -#endif - #endif /* linux/x86_64/sysdep.h */ -- cgit v1.2.3