From 2bf037b4e8e189e910a41744d79404b94235ab8b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 20 Dec 2005 18:05:57 +0000 Subject: Updated to fedora-glibc-20051220T1751 --- sysdeps/unix/sysv/linux/sh/sysdep.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'sysdeps/unix/sysv/linux/sh/sysdep.h') diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h index d56ec454f9..1a412e53db 100644 --- a/sysdeps/unix/sysv/linux/sh/sysdep.h +++ b/sysdeps/unix/sysv/linux/sh/sysdep.h @@ -1,5 +1,5 @@ -/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004 - Free Software Foundation, Inc. +/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004, + 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, , August 1995. Changed by Kaz Kojima, . @@ -24,6 +24,7 @@ /* There is some commonality. */ #include +#include /* For Linux we can use the system call table in the header file /usr/include/asm/unistd.h @@ -104,7 +105,7 @@ mova 0f,r0; \ add r0,r12; \ mov.l 1f,r0; \ - mov.l r1,@(r0,r12) + mov.l r1,@(r0,r12); \ bra .Lpseudo_end; \ mov _IMM1,r0; \ .align 2; \ @@ -359,4 +360,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. Using a global variable + is too complicated here since we have no PC-relative addressing mode. */ +#else +# ifdef __ASSEMBLER__ +# define PTR_MANGLE(reg) \ + stc gbr,r1; mov.l @(POINTER_GUARD,r1),r1; xor r1,reg +# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# 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/sh/sysdep.h */ -- cgit v1.2.3