This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use 64-bit anonymouse union on x32 TCB pointer_guard
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 17 May 2012 20:52:21 -0700
- Subject: PATCH: Use 64-bit anonymouse union on x32 TCB pointer_guard
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses 64-bit anonymouse union on x32 TCB pointer_guard to
support 64-bit PTR_MANGLE/PTR_DEMANGLE. I verifed that there is no
change in x86-64 TCB offsets. Tested on Linux/x32. OK to install?
Thanks.
H.J.
----
* sysdeps/x86_64/tls.h (tcbhead_t): Use anonymouse union on
pointer_guard. Reordor fields for x32.
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index f838916..c593bc8 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -52,17 +52,30 @@ typedef struct
int gscope_flag;
uintptr_t sysinfo;
uintptr_t stack_guard;
+# ifdef __ILP32__
+ int rtld_must_xmm_save;
+ union
+ {
+ /* Needed for 64-bit PTR_MANGLE/PTR_DEMANGLE. */
+ uintptr_t pointer_guard;
+ int64_t __pointer_guard_word;
+ };
+ unsigned long int vgetcpu_cache[2];
+ /* Reservation of some values for the TM ABI. */
+ void *__private_tm[5];
+# else
uintptr_t pointer_guard;
unsigned long int vgetcpu_cache[2];
-# ifndef __ASSUME_PRIVATE_FUTEX
+# ifndef __ASSUME_PRIVATE_FUTEX
int private_futex;
-# else
+# else
int __unused1;
-# endif
+# endif
int rtld_must_xmm_save;
/* Reservation of some values for the TM ABI. */
void *__private_tm[5];
long int __unused2;
+# endif
/* Have space for the post-AVX register size. */
__m128 rtld_savespace_sse[8][4] __attribute__ ((aligned (32)));