summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle McMartin <kmcmarti@redhat.com>2014-05-26 12:33:22 +0530
committerWill Newton <will.newton@linaro.org>2014-07-03 14:57:46 +0100
commit5321828811bbfe277da5a4098fd960e41b23df3a (patch)
tree5828f845ad7d548331bd315fbd4dc37faf4cdad3
parentcdce90210139c9d406d5cee1271147e3a466c932 (diff)
correct alignment of TLS_TCB_ALIGN (BZ #16796)
This fixes a variety of testsuite failures for me: tststatic.out Error 1 tststatic2.out Error 1 tst-tls9-static.out Error 1 tst-audit8.out Error 127 tst-audit9.out Error 127 tst-audit1.out Error 127 and also has the added benefit of making LD_AUDIT/sotruss work on AArch64. Otherwise, we bail out early in _dl_try_allocate_static_tls as the alignment requirement of the PT_TLS section in libc is 16.
-rw-r--r--libc/ports/ChangeLog.aarch64.linaro6
-rw-r--r--libc/ports/sysdeps/aarch64/nptl/tls.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/libc/ports/ChangeLog.aarch64.linaro b/libc/ports/ChangeLog.aarch64.linaro
index 4f7ca07a4..fc9f56268 100644
--- a/libc/ports/ChangeLog.aarch64.linaro
+++ b/libc/ports/ChangeLog.aarch64.linaro
@@ -1,3 +1,9 @@
+2014-05-26 Kyle McMartin <kyle@redhat.com>
+
+ [BZ #16796]
+ * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the
+ alignment of struct pthread.
+
2014-05-25 Richard Henderson <rth@twiddle.net>
* sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h
diff --git a/libc/ports/sysdeps/aarch64/nptl/tls.h b/libc/ports/sysdeps/aarch64/nptl/tls.h
index f03c5195d..badad3d27 100644
--- a/libc/ports/sysdeps/aarch64/nptl/tls.h
+++ b/libc/ports/sysdeps/aarch64/nptl/tls.h
@@ -62,7 +62,7 @@ typedef struct
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
/* This is the size of the TCB. */
# define TLS_TCB_SIZE sizeof (tcbhead_t)
@@ -71,7 +71,7 @@ typedef struct
# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
/* Alignment requirements for the TCB. */
-# define TLS_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
/* Install the dtv pointer. The pointer passed is to the element with
index -1 which contain the length. */