This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Add x32 support to sysdeps/x86_64/dl-tlsdesc.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]