providing __tls_get_addr on s390?
Carlos O'Donell
carlos@redhat.com
Fri Sep 6 03:30:00 GMT 2019
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.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list