I'm going to add the test case to the test suite momentarily, so I won't attach it here. The test case contains: static __thread int tdata1 = 1; static __thread int tdata2 __attribute__ ((aligned (0x10))) = 2; static __thread int tdata3 __attribute__ ((aligned (0x1000))) = 4; static __thread int tbss1; static __thread int tbss2 __attribute__ ((aligned (0x10))); static __thread int tbss3 __attribute__ ((aligned (0x1000))); On arm-linux-gnueabihf, tdata3 comes out with bad alignment and not initialized with the right value and tbss3 comes out with bad alignment. It's the same in the dynamic and static versions of the case. On x86_64-linux-gnu, the dynamic version works right but the static version crashes in startup.
This now has test cases elf/tst-tlsalign{,-extern}{,-static} in the tree. The ARM failures appear to be an assembler bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18481 There are failures on x86 which are not yet explained.
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU C Library master sources". The branch, master has been updated via a7fcc2f8edb26e4d54b6a740aaa3f3bb0caebd14 (commit) from f9536db79065ad00efd877b4d80a1dd06938bd0a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a7fcc2f8edb26e4d54b6a740aaa3f3bb0caebd14 commit a7fcc2f8edb26e4d54b6a740aaa3f3bb0caebd14 Author: H.J. Lu <hjl.tools@gmail.com> Date: Thu May 7 13:26:34 2015 -0700 Align TCB offset to the maximum alignment We need to align TCB offset to the maximum alignment for TLS_TCB_AT_TP targets, as _dl_allocate_tls_storage (in elf/dl-tls.c) does using __libc_memalign and dl_tls_static_align. [BZ #18383] * csu/libc-tls.c (__libc_setup_tls) [TLS_TCB_AT_TP]: Align TCB_OFFSET to MAX_ALIGN, not just TCBALIGN. Add comment. * elf/Makefile (test-xfail-tst-tlsalign{,-static}): Remove comment for i386/x86-64. (test-xfail-tst-tlsalign-extern-static): Removed. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 +++++++++ csu/libc-tls.c | 5 ++++- elf/Makefile | 5 +---- 3 files changed, 14 insertions(+), 5 deletions(-)
The only known libc bug here was the x86 case shown fixed in comment#2. The libc test suite now expects the ARM failures when the known assembler bug (bug #18481) is detected.