diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-02-01 16:14:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-02-01 16:14:15 +0000 |
commit | 4a44ce79c6dee9a77207466142a36caa9fa54141 (patch) | |
tree | 20a07e11954af12cf170253bbc4429e28ca928df /sysdeps | |
parent | 58a2d52e95b8c38ce43dcfbd6cce1d1ca1196c61 (diff) | |
download | glibc-4a44ce79c6dee9a77207466142a36caa9fa54141.tar.gz glibc-4a44ce79c6dee9a77207466142a36caa9fa54141.tar.xz glibc-4a44ce79c6dee9a77207466142a36caa9fa54141.zip |
* sysdeps/unix/sysv/linux/i386/sysdep.h (PTR_MANGLE): Roll value before cvs/fedora-glibc-20070202T0923
returning. (PTR_DEMANGLE): Real definition now that it's not the same as PRT_MANGLE anymore. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * string/strerror_l.c: New file. * string/Makefile (routines): Add strerror_l. * string/string.h: Declare strerror_l. * string/Versions: Export strerror_l for GLIBC_2.6. * nscd/connections.c (nscd_run): Don't define MAXKEYLEN here.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 18 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/sysdep.h | 31 |
2 files changed, 35 insertions, 14 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 5286676fc1..89d5b12043 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,1993,1995-2000,2002-2005,2006 +/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995. @@ -566,15 +566,23 @@ asm (".L__X'%ebx = 1\n\t" is too complicated here since we have no PC-relative addressing mode. */ #else # ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# 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 -# define PTR_MANGLE(var) asm ("xorl %%gs:%c2, %0" \ +# 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))) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) # endif #endif diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index 5dfffca455..3a0a632aab 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2001-2005, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -317,24 +317,37 @@ /* 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 -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# 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"\ +# 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)) -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) # endif #else # ifdef __ASSEMBLER__ -# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg -# define PTR_DEMANGLE(reg) PTR_MANGLE (reg) +# 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" \ +# 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))) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) # endif #endif |