diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-12-20 10:50:52 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-12-20 10:50:52 +0000 |
commit | 7d0bcd10a7e3455697985522580267c8470cfcb9 (patch) | |
tree | e297bb71c9979eda34a12ca4f3ff1acf5194d886 /sysdeps/unix/sysv/linux/powerpc | |
parent | 2c6cfe6853a30deb4af842aacc924fa298d0521a (diff) | |
download | glibc-7d0bcd10a7e3455697985522580267c8470cfcb9.tar glibc-7d0bcd10a7e3455697985522580267c8470cfcb9.tar.gz glibc-7d0bcd10a7e3455697985522580267c8470cfcb9.tar.bz2 glibc-7d0bcd10a7e3455697985522580267c8470cfcb9.zip |
Updated to fedora-glibc-20051220T1028
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 19 |
2 files changed, 37 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index 81f37c5103..546e712edc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -20,6 +20,7 @@ #define _LINUX_POWERPC_SYSDEP_H 1 #include <sysdeps/unix/powerpc/sysdep.h> +#include <tls.h> /* Some systen calls got renamed over time, but retained the same semantics. Handle them here so they can be catched by both C and assembler stubs in @@ -170,4 +171,21 @@ #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_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# else +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif + #endif /* linux/powerpc/powerpc32/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index c3463f7431..3ece017563 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -23,6 +23,7 @@ #define _LINUX_POWERPC_SYSDEP_H 1 #include <sysdeps/unix/powerpc/sysdep.h> +#include <tls.h> /* Define __set_errno() for INLINE_SYSCALL macro below. */ #ifndef __ASSEMBLER__ @@ -180,4 +181,22 @@ #define ASM_INPUT_5 ASM_INPUT_4, "5" (r7) #define ASM_INPUT_6 ASM_INPUT_5, "6" (r8) + +/* 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) \ + ld tmpreg,POINTER_GUARD(r13); \ + xor reg,tmpreg,reg +# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg) +# else +# define PTR_MANGLE(var) \ + (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ()) +# define PTR_DEMANGLE(var) PTR_MANGLE (var) +# endif +#endif + #endif /* linux/powerpc/powerpc64/sysdep.h */ |