提交 ebee8c2b 编写于 作者: R Rich Felker

fix crashes in static-linked multithreaded programs without TLS

上级 6a04d1b8
......@@ -60,6 +60,8 @@ void __init_tls(size_t *aux)
Phdr *phdr, *tls_phdr=0;
size_t base = 0;
libc.tls_size = sizeof(struct pthread);
for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) {
phdr = (void *)p;
if (phdr->p_type == PT_PHDR)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册