This is the mail archive of the
mailing list for the GCC project.
Re: RFC: Add ___tls_get_addr
On Wed, Jul 5, 2017 at 8:51 AM, Carlos O'Donell <firstname.lastname@example.org> wrote:
> 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:
>> 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.
___tls_get_addr is generated by compilers, not by programmers.
Linker needs to check it. The shorter of the function name, the better.