summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arc/sysdep.h5
-rw-r--r--libc/sysdeps/linux/arm/sysdep.h5
-rw-r--r--libc/sysdeps/linux/i386/sysdep.h30
-rw-r--r--libc/sysdeps/linux/metag/sysdep.h4
-rw-r--r--libc/sysdeps/linux/mips/sysdep.h6
-rw-r--r--libc/sysdeps/linux/powerpc/bits/syscalls.h26
-rw-r--r--libc/sysdeps/linux/sh/sysdep.h20
-rw-r--r--libc/sysdeps/linux/sparc/sysdep.h5
-rw-r--r--libc/sysdeps/linux/x86_64/sched_getcpu.S1
-rw-r--r--libc/sysdeps/linux/x86_64/sysdep.h41
-rw-r--r--libc/sysdeps/linux/xtensa/sysdep.h5
11 files changed, 0 insertions, 148 deletions
diff --git a/libc/sysdeps/linux/arc/sysdep.h b/libc/sysdeps/linux/arc/sysdep.h
index d75d89100..5fcc63deb 100644
--- a/libc/sysdeps/linux/arc/sysdep.h
+++ b/libc/sysdeps/linux/arc/sysdep.h
@@ -18,9 +18,4 @@ nm:
#endif /* __ASSEMBLER __*/
#include <common/sysdep.h>
-
-/* Pointer mangling is not yet supported */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif
diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h
index cdc276c8a..208521f1c 100644
--- a/libc/sysdeps/linux/arm/sysdep.h
+++ b/libc/sysdeps/linux/arm/sysdep.h
@@ -277,9 +277,4 @@ __local_syscall_error: \
#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for ARM. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif /* linux/arm/sysdep.h */
diff --git a/libc/sysdeps/linux/i386/sysdep.h b/libc/sysdeps/linux/i386/sysdep.h
index c92a10663..4fa47fcf2 100644
--- a/libc/sysdeps/linux/i386/sysdep.h
+++ b/libc/sysdeps/linux/i386/sysdep.h
@@ -396,34 +396,4 @@ __x86.get_pc_thunk.reg: \
cfi_restore (ebp); L(POPBP1):
#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. Using a global variable
- is too complicated here since we have no PC-relative addressing mode. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg; \
- roll $9, reg
-# define PTR_DEMANGLE(reg) rorl $9, reg; \
- xorl %gs:POINTER_GUARD, reg
-# else
-# include <stddef.h>
-# define PTR_MANGLE(var) __asm__ ("xorl %%gs:%c2, %0\n" \
- "roll $9, %0" \
- : "=r" (var) \
- : "0" (var), \
- "i" (offsetof (tcbhead_t, \
- pointer_guard)))
-# define PTR_DEMANGLE(var) __asm__ ("rorl $9, %0\n" \
- "xorl %%gs:%c2, %0" \
- : "=r" (var) \
- : "0" (var), \
- "i" (offsetof (tcbhead_t, \
- pointer_guard)))
-# endif
-#endif
-
#endif /* linux/i386/sysdep.h */
diff --git a/libc/sysdeps/linux/metag/sysdep.h b/libc/sysdeps/linux/metag/sysdep.h
index a12f393ce..8750641b6 100644
--- a/libc/sysdeps/linux/metag/sysdep.h
+++ b/libc/sysdeps/linux/metag/sysdep.h
@@ -53,7 +53,3 @@ __local_syscall_error: \
#endif
#endif /* __ASSEMBLER __*/
-
-/* Pointer mangling is not yet supported for META. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
diff --git a/libc/sysdeps/linux/mips/sysdep.h b/libc/sysdeps/linux/mips/sysdep.h
index 86873ac7b..e0c5c9488 100644
--- a/libc/sysdeps/linux/mips/sysdep.h
+++ b/libc/sysdeps/linux/mips/sysdep.h
@@ -128,11 +128,5 @@ L(syse1):
# define SYSCALL_ERROR_LABEL 99b
#endif
-#else /* ! __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for MIPS. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif /* __ASSEMBLER__ */
#endif /* _LINUX_MIPS_SYSDEP_H */
diff --git a/libc/sysdeps/linux/powerpc/bits/syscalls.h b/libc/sysdeps/linux/powerpc/bits/syscalls.h
index c52d5dd5b..d0f78c365 100644
--- a/libc/sysdeps/linux/powerpc/bits/syscalls.h
+++ b/libc/sysdeps/linux/powerpc/bits/syscalls.h
@@ -226,30 +226,4 @@ extern void __illegally_sized_syscall_arg6(void);
# define ASM_INPUT_6 ASM_INPUT_5, "6" (r8)
#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. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg, tmpreg) \
- lwz tmpreg,POINTER_GUARD(r2); \
- xor reg,tmpreg,reg
-# define PTR_MANGLE2(reg, tmpreg) \
- xor reg,tmpreg,reg
-# define PTR_MANGLE3(destreg, reg, tmpreg) \
- lwz tmpreg,POINTER_GUARD(r2); \
- xor destreg,tmpreg,reg
-# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg)
-# define PTR_DEMANGLE2(reg, tmpreg) PTR_MANGLE2 (reg, tmpreg)
-# define PTR_DEMANGLE3(destreg, reg, tmpreg) PTR_MANGLE3 (destreg, reg, tmpreg)
-# 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 /* _BITS_SYSCALLS_H */
diff --git a/libc/sysdeps/linux/sh/sysdep.h b/libc/sysdeps/linux/sh/sysdep.h
index b9b0009a5..281c4158e 100644
--- a/libc/sysdeps/linux/sh/sysdep.h
+++ b/libc/sysdeps/linux/sh/sysdep.h
@@ -271,23 +271,3 @@
1: .long SYS_ify (syscall_name); \
2:
#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. Using a global variable
- is too complicated here since we have no PC-relative addressing mode. */
-#else
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg, tmp) \
- stc gbr,tmp; mov.l @(POINTER_GUARD,tmp),tmp; xor tmp,reg
-# define PTR_MANGLE2(reg, tmp) xor tmp,reg
-# define PTR_DEMANGLE(reg, tmp) PTR_MANGLE (reg, tmp)
-# define PTR_DEMANGLE2(reg, tmp) PTR_MANGLE2 (reg, tmp)
-# else
-# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
-# define PTR_DEMANGLE(var) PTR_MANGLE (var)
-# endif
-#endif
-
diff --git a/libc/sysdeps/linux/sparc/sysdep.h b/libc/sysdeps/linux/sparc/sysdep.h
index cf3e3afd1..c3897ec08 100644
--- a/libc/sysdeps/linux/sparc/sysdep.h
+++ b/libc/sysdeps/linux/sparc/sysdep.h
@@ -61,9 +61,4 @@ ENTRY(name); \
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for SPARC. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif
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 */
diff --git a/libc/sysdeps/linux/xtensa/sysdep.h b/libc/sysdeps/linux/xtensa/sysdep.h
index f5a40eb3a..060b9b918 100644
--- a/libc/sysdeps/linux/xtensa/sysdep.h
+++ b/libc/sysdeps/linux/xtensa/sysdep.h
@@ -207,9 +207,4 @@
#endif /* _LIBC_REENTRANT */
#endif /* __ASSEMBLER__ */
-
-/* Pointer mangling is not yet supported for Xtensa. */
-#define PTR_MANGLE(var) (void) (var)
-#define PTR_DEMANGLE(var) (void) (var)
-
#endif /* _LINUX_XTENSA_SYSDEP_H */