This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Add ___tls_get_addr
- From: Carlos O'Donell <carlos at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, "x86-64-abi at googlegroups dot com" <x86-64-abi at googlegroups dot com>, GNU C Library <libc-alpha at sourceware dot org>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 5 Jul 2017 11:51:08 -0400
- Subject: Re: RFC: Add ___tls_get_addr
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOrYdAh6kJUUTdyzWdwfhEWVuiHJVs5xhp4pVbeB6hEM1w@mail.gmail.com>
On 07/05/2017 11:38 AM, H.J. Lu wrote:
> On x86-64, __tls_get_addr has to realigns stack so that binaries compiled by
> GCCs older than GCC 4.9.4:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066
>
> continue to work even if vector instructions are used by functions called
> from __tls_get_addr, which assumes 16-byte stack alignment as specified
> by x86-64 psABI.
>
> We are considering to add an alternative interface, ___tls_get_addr, to
> glibc, which doesn't realign stack. Compilers, which properly align stack
> for TLS, call generate call to ___tls_get_addr, instead of __tls_get_addr,
> if ___tls_get_addr is available.
>
> Any comments?
Overall I agree with the idea.
However, the triple underscore will lead to eventual human error, can we
avoid that error by changing the name in an meaningful way? I don't care
what you choose really.
--
Cheers,
Carlos.