提交 c06c1eb6 编写于 作者: S Szabolcs Nagy 提交者: Rich Felker

fix tls access on arm targets before armv6k

commit 610c5a85 changed the thread
pointer setup so tp points at the end of the pthread struct on arm,
but failed to update __aeabi_read_tp so it was off by 8.

this broke tls access in code that is compiled with -mtp=soft, which
is the default when target arch is pre armv6k or thumb1.

maintainer's note: no release versions are affected.
上级 f4542fdf
......@@ -4,5 +4,5 @@
__attribute__((__visibility__("hidden")))
void *__aeabi_read_tp_c(void)
{
return (void *)((uintptr_t)__pthread_self()-8+sizeof(struct pthread));
return TP_ADJ(__pthread_self());
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册