source:
patches/glibc-2.7-alpha_PTR_MANGLE_fix-1.patch@
d51db58
Last change on this file since d51db58 was 67300de, checked in by , 16 years ago | |
---|---|
|
|
File size: 3.5 KB |
-
sysdeps/unix/alpha/sysdep.h
Submitted By: Joe Ciccone <jciccone@gmail.com> Date: 2007-12-21 Initial Package Version: 2.7 Upstream Status: Reported Origin: http://sources.redhat.com/bugzilla/show_bug.cgi?id=5216 Description: Moves and fixes the PTR_MANGLE definitions.
old new 397 397 _sc_ret = _sc_0, _sc_err = _sc_19; \ 398 398 } 399 399 400 /* Pointer mangling support. Note that tls access is slow enough that401 we don't deoptimize things by placing the pointer check value there. */402 403 #include <stdint.h>404 405 #if defined NOT_IN_libc && defined IS_IN_rtld406 # ifdef __ASSEMBLER__407 # define PTR_MANGLE(dst, src, tmp) \408 ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \409 ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \410 xor src, tmp, dst411 # define PTR_MANGLE2(dst, src, tmp) \412 xor src, tmp, dst413 # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)414 # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)415 # else416 extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;417 # define PTR_MANGLE(var) \418 (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)419 # define PTR_DEMANGLE(var) PTR_MANGLE(var)420 # endif421 #elif defined PIC422 # ifdef __ASSEMBLER__423 # define PTR_MANGLE(dst, src, tmp) \424 ldq tmp, __pointer_chk_guard; \425 xor src, tmp, dst426 # define PTR_MANGLE2(dst, src, tmp) \427 xor src, tmp, dst428 # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)429 # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)430 # else431 extern uintptr_t __pointer_chk_guard attribute_relro;432 # define PTR_MANGLE(var) \433 (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)434 # define PTR_DEMANGLE(var) PTR_MANGLE(var)435 # endif436 #endif437 438 400 #endif /* ASSEMBLER */ -
sysdeps/unix/sysv/linux/alpha/sysdep.h
old new 98 98 INTERNAL_SYSCALL1(name, err_out, nr, args); \ 99 99 }) 100 100 101 /* Pointer mangling support. Note that tls access is slow enough that 102 we don't deoptimize things by placing the pointer check value there. */ 103 104 #if defined NOT_IN_libc && defined IS_IN_rtld 105 # ifdef __ASSEMBLER__ 106 # define PTR_MANGLE(dst, src, tmp) \ 107 ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ 108 ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ 109 xor src, tmp, dst 110 # define PTR_MANGLE2(dst, src, tmp) \ 111 xor src, tmp, dst 112 # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) 113 # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) 114 # else 115 extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; 116 # define PTR_MANGLE(var) \ 117 (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) 118 # define PTR_DEMANGLE(var) PTR_MANGLE(var) 119 # endif 120 #elif defined PIC 121 # ifdef __ASSEMBLER__ 122 # define PTR_MANGLE(dst, src, tmp) \ 123 ldq tmp, __pointer_chk_guard; \ 124 xor src, tmp, dst 125 # define PTR_MANGLE2(dst, src, tmp) \ 126 xor src, tmp, dst 127 # define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) 128 # define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) 129 # else 130 extern uintptr_t __pointer_chk_guard attribute_relro; 131 # define PTR_MANGLE(var) \ 132 (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) 133 # define PTR_DEMANGLE(var) PTR_MANGLE(var) 134 # endif 135 #else 136 /* Pointer mangling is not yet supported for static libc on alpha. */ 137 # ifndef __ASSEMBLER__ 138 # define PTR_MANGLE(var) (void) (var) 139 # define PTR_DEMANGLE(var) (void) (var) 140 # endif 141 #endif 142 101 143 #endif /* _LINUX_ALPHA_SYSDEP_H */
Note:
See TracBrowser
for help on using the repository browser.