alpha: Define PTR_MANGLE for !PIC too.

Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2010-03-26 10:30:25 -07:00
parent cce01cf0a1
commit ee390edfa9
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2010-03-26 Richard Henderson <rth@redhat.com>
* sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too.
(PTR_DEMANGLE): Likewise.
2010-03-26 Richard Henderson <rth@redhat.com>
* sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P,

View file

@ -430,11 +430,21 @@ extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
# 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 attribute_relro;
extern const uintptr_t __pointer_chk_guard attribute_relro;
# define PTR_MANGLE(var) \
(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
(var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
# define PTR_DEMANGLE(var) PTR_MANGLE(var)
# endif
#else
/* There exists generic C code that assumes that PTR_MANGLE is always
defined. When generating code for the static libc, we don't have
__pointer_chk_guard defined. Nor is there any place that would
initialize it if it were defined, so there's little point in doing
anything more than nothing. */
# ifndef __ASSEMBLER__
# define PTR_MANGLE(var)
# define PTR_DEMANGLE(var)
# endif
#endif
#endif /* ASSEMBLER */