This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86-64: Align the stack in __tls_get_addr [BZ #21609]
On 07/04/2017 10:28 PM, H.J. Lu wrote:
> 2017-07-04 Florian Weimer <fweimer@redhat.com>
> H.J. Lu <hongjiu.lu@intel.com>
>
> [BZ #21609]
> * sysdeps/x86_64/Makefile (sysdep-dl-routines): Add tls_get_addr.
> (gen-as-const-headers): Add rtld-offsets.sym.
> * sysdeps/x86_64/dl-tls.c: New file.
> * sysdeps/x86_64/rtld-offsets.sym: Likwise.
> * sysdeps/x86_64/tls_get_addr.S: Likewise.
> * sysdeps/x86_64/dl-tls.h: Add multiple inclusion guards.
> * sysdeps/x86_64/tlsdesc.sym (TI_MODULE_OFFSET): New.
> (TI_OFFSET_OFFSET): Likwise.
I verified that the addition of __tls_get_addr_slow does not affect the
inlining decisions made by GCC 6, so I think this patch is okay. Would
you please commit it?
I would like to backport it to older glibc branches as well (at least
2.25 and 2.24).
I'm not sure if the second patch is actually needed, and if the new
symbol is the right way to do it. It penalizes those who use modern and
fixed compilers by making their lives more complicated, while we should
do it the other way round (those who use unfixed compilers should
suffer, at least if the choice is between the two outcomes).
Thanks,
Florian