rtld: fix allocate_module_tls() variant I fallback to static allocation

Submitted by:	Joerg Sonnenberger
Fixes:	91880e07f605edb90339685bc934699a4344de3bESC
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2023-06-09 03:51:32 +03:00
parent 5253d74e46
commit e9a38ed2fa

View file

@ -5465,7 +5465,7 @@ allocate_module_tls(int index)
if (obj->tls_static) {
#ifdef TLS_VARIANT_I
p = (char *)_tcb_get() + obj->tlsoffset;
p = (char *)_tcb_get() + obj->tlsoffset + TLS_TCB_SIZE;
#else
p = (char *)_tcb_get() - obj->tlsoffset;
#endif