This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: providing __tls_get_addr on s390?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]