Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 201910
Collapse All | Expand All

(-)file_not_specified_in_diff (-40 / +44 lines)
Line  Link Here
0
-- sysdeps/unix/alpha/sysdep.h
0
++ sysdeps/unix/alpha/sysdep.h
Lines 397-438 __LABEL(name) \ Link Here
397
	_sc_ret = _sc_0, _sc_err = _sc_19;			\
397
	_sc_ret = _sc_0, _sc_err = _sc_19;			\
398
}
398
}
399
399
400
/* Pointer mangling support.  Note that tls access is slow enough that
401
   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_rtld
406
# 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, dst
411
#  define PTR_MANGLE2(dst, src, tmp)				\
412
	xor	src, tmp, dst
413
#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
414
#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
415
# else
416
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
# endif
421
#elif defined PIC
422
# ifdef __ASSEMBLER__
423
#  define PTR_MANGLE(dst, src, tmp)		\
424
	ldq	tmp, __pointer_chk_guard;	\
425
	xor	src, tmp, dst
426
#  define PTR_MANGLE2(dst, src, tmp)		\
427
	xor	src, tmp, dst
428
#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
429
#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
430
# else
431
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
# endif
436
#endif
437
438
#endif /* ASSEMBLER */
400
#endif /* ASSEMBLER */
439
-- sysdeps/unix/sysv/linux/alpha/sysdep.h
401
++ sysdeps/unix/sysv/linux/alpha/sysdep.h
Lines 98-101 Link Here
98
	INTERNAL_SYSCALL1(name, err_out, nr, args);			\
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
#endif /* _LINUX_ALPHA_SYSDEP_H */
143
#endif /* _LINUX_ALPHA_SYSDEP_H */

Return to bug 201910