From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- sysdeps/unix/sysv/linux/ia64/sysdep.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/ia64/sysdep.h') diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h index a4453ddcc7..dd7a5b1b1d 100644 --- a/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -1,4 +1,5 @@ -/* Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jes Sorensen, , April 1999. Based on code originally written by David Mosberger-Tang @@ -204,7 +205,7 @@ register long _r8 __asm ("r8"); \ register long _r10 __asm ("r10"); \ register long _r15 __asm ("r15") = name; \ - register void *_b7 __asm ("b7") = ((tcbhead_t *) __thread_self)->private; \ + register void *_b7 __asm ("b7") = ((tcbhead_t *)__thread_self)->__private;\ long _retval; \ LOAD_REGS_##nr \ /* \ @@ -360,4 +361,24 @@ #endif /* not __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) \ + add tmpreg=-16,r13 \ + ;; \ + ld8 tmpreg=[tmpreg] \ + ;; \ + xor reg=reg, tmpreg +# 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/ia64/sysdep.h */ -- cgit v1.2.1