http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066
--- Comment #3 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
(In reply to Paul Pluzhnikov from comment #2)
> What is the way to turn it on?
Compiling test case with -mtls-dialect=gnu2 does appear to improve the picture:
g++ -fPIC -O2 -S t.cc -mtls-dialect=gnu2
__cxa_get_globals:
leaq _ZL3ccc@TLSDESC(%rip), %rax
call *_ZL3ccc@TLSCALL(%rax)
addq %fs:0, %rax
ret
The indirect call goes to _dl_tlsdesc_dynamic in ld-linux-x86-64.so.2 with
misaligned stack, and the latter re-aligns it.