diff options
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r-- | libphobos/libdruntime/gcc/sections/elf_shared.d | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libphobos/libdruntime/gcc/sections/elf_shared.d b/libphobos/libdruntime/gcc/sections/elf_shared.d index 7ff87a8..59e2dd6 100644 --- a/libphobos/libdruntime/gcc/sections/elf_shared.d +++ b/libphobos/libdruntime/gcc/sections/elf_shared.d @@ -1084,7 +1084,9 @@ void[] getTLSRange(size_t mod, size_t sz) nothrow @nogc // base offset auto ti = tls_index(mod, 0); - version (IBMZ_Any) + version (CRuntime_Musl) + return (__tls_get_addr(&ti)-TLS_DTV_OFFSET)[0 .. sz]; + else version (IBMZ_Any) { // IBM Z only provides __tls_get_offset instead of __tls_get_addr // which returns an offset relative to the thread pointer. |