This is the mail archive of the
mailing list for the glibc project.
Re: providing __tls_get_addr on s390?
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Stefan Liebler <stli at linux dot ibm dot com>, libc-alpha at sourceware dot org
- Cc: Florian Weimer <fweimer at redhat dot com>, Robin Dapp <rdapp at de dot ibm dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Thu, 5 Sep 2019 23:30:21 -0400
- Subject: Re: providing __tls_get_addr on s390?
- References: <20190831141030.GA6914@aurel32.net> <email@example.com> <firstname.lastname@example.org>
On 9/2/19 8:24 AM, Stefan Liebler wrote:
> The D-language runtime should be fixed and use __tls_get_offset
> instead of __tls_get_addr_internal@GLIBC_PRIVATE on s390x/s390.
> __tls_get_offset internally computes the address of the tls_index
> struct and then calls the not exported __tls_get_addr function. But
> as __tls_get_offset assumes that the tls_index struct is located in
> the GOT of the caller, it just adds r12 (=GOT-pointer) to the
> provided offset in order to get the address to tls_index struct.
> As Florian Weimer has already mentioned in
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91628#c6 the offset
> could be prepared. Usually r12 is setup by the compiler for
> cross-module calls. It is a call-saved register and is not modified
> by the PLT code.
Agreed, I think we're making progress here at removing the use of
GLIBC_PRIVATE from the D runtime which is great.