mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 00:20:29 +00:00
Always allocate a TLS area even if its empty - libpthread relies on
having a valid %gs when it initialises. MFC after: 2 days
This commit is contained in:
parent
4233992afa
commit
0e7e4e5fd6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133949
|
@ -239,6 +239,7 @@ _init_tls()
|
|||
Elf_Phdr *phdr;
|
||||
size_t phent, phnum;
|
||||
int i;
|
||||
void *tls;
|
||||
|
||||
sp = (Elf_Addr *) environ;
|
||||
while (*sp++ != 0)
|
||||
|
@ -280,13 +281,9 @@ _init_tls()
|
|||
}
|
||||
}
|
||||
|
||||
if (tls_static_space > 0) {
|
||||
void* tls;
|
||||
tls = _rtld_allocate_tls(NULL, 2*sizeof(Elf_Addr),
|
||||
sizeof(Elf_Addr));
|
||||
|
||||
tls = _rtld_allocate_tls(NULL, 2*sizeof(Elf_Addr),
|
||||
sizeof(Elf_Addr));
|
||||
|
||||
_set_tp(tls);
|
||||
}
|
||||
_set_tp(tls);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue