Author: madcoder
Date: 2007-11-01 20:57:54 +0000 (Thu, 01 Nov 2007)
New Revision: 2646

Modified:
   
glibc-package/branches/glibc-2.7/debian/patches/alpha/submitted-PTR_MANGLE.diff
Log:
Don't try to be smart, just fix the obvious issue first.

Signed-off-by: Pierre Habouzit <[EMAIL PROTECTED]>


Modified: 
glibc-package/branches/glibc-2.7/debian/patches/alpha/submitted-PTR_MANGLE.diff
===================================================================
--- 
glibc-package/branches/glibc-2.7/debian/patches/alpha/submitted-PTR_MANGLE.diff 
    2007-11-01 17:21:30 UTC (rev 2645)
+++ 
glibc-package/branches/glibc-2.7/debian/patches/alpha/submitted-PTR_MANGLE.diff 
    2007-11-01 20:57:54 UTC (rev 2646)
@@ -45,7 +45,7 @@
  #endif /* ASSEMBLER */
 --- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
 +++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h
-@@ -98,4 +98,30 @@
+@@ -98,4 +98,42 @@
        INTERNAL_SYSCALL1(name, err_out, nr, args);                     \
  })
  
@@ -55,11 +55,23 @@
 +#include <stdint.h>
 +
 +#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(dst, src, tmp)                           \
++      ldah    tmp, __pointer_chk_guard_local($29) !gprelhigh; \
++      ldq     tmp, __pointer_chk_guard_local(tmp) !gprellow;  \
++      xor     src, tmp, dst
++#  define PTR_MANGLE2(dst, src, tmp)                          \
++      xor     src, tmp, dst
++#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
++#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
++# else
++extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
++#  define PTR_MANGLE(var)     \
++  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
++#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
++# endif
++#elif defined PIC
++# ifdef __ASSEMBLER__
 +#  define PTR_MANGLE(dst, src, tmp)           \
 +      ldq     tmp, __pointer_chk_guard;       \
 +      xor     src, tmp, dst


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to