https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91628
--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject dot org> --- (In reply to Florian Weimer from comment #4) > (In reply to Iain Buclaw from comment #3) > > The use of the function is for the garbage collector to be able to scan > > native TLS data. > > > > The logic of said function pretty much matches what the glibc macro > > __TLS_GET_ADDR is doing. > > But you can use __tls_get_addr on other architectures, right? > That is correct. I'll link the offending code for reference. http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libphobos/libdruntime/gcc/sections/elf_shared.d;h=7f9036bf5052861960f8a1d4a20838437c5c519c;hb=refs/heads/trunk#l1030 > I think for s390 and s390x, you should implement you own version of > __tls_get_addr (under a different/hidden name, of course) which is based on > __tls_get_offset, which is the official interface for this. Would it be possible to infer the base address of the TLS range doing that though?