This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Add x32 support to sysdeps/x86_64/dl-tlsdesc.h
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 19 Mar 2012 17:39:15 -0700
- Subject: PATCH: Add x32 support to sysdeps/x86_64/dl-tlsdesc.h
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
X32 GOT layout is identical to x86-64. This patch pads tlsdesc for x32
and replaces long with long long in dl_tls_index. OK to install?
Thanks.
H.J.
--
2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/dl-tlsdesc.h (tlsdesc): Pad for x32.
(dl_tls_index): Replace long with long long.
diff --git a/sysdeps/x86_64/dl-tlsdesc.h b/sysdeps/x86_64/dl-tlsdesc.h
index 82a0109..6c498df 100644
--- a/sysdeps/x86_64/dl-tlsdesc.h
+++ b/sysdeps/x86_64/dl-tlsdesc.h
@@ -30,13 +30,19 @@
struct tlsdesc
{
ptrdiff_t (*entry)(struct tlsdesc *on_rax);
+#ifndef __LP64__
+ int pad1;
+#endif
void *arg;
+#ifndef __LP64__
+ int pad2;
+#endif
};
typedef struct dl_tls_index
{
- unsigned long int ti_module;
- unsigned long int ti_offset;
+ unsigned long long int ti_module;
+ unsigned long long int ti_offset;
} tls_index;
/* Type used as the argument in a TLS descriptor for a symbol that
--
1.7.6.5