We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7480d0 commit c74c344Copy full SHA for c74c344
libc/loader/linux/x86_64/start.cpp
@@ -38,7 +38,9 @@ void initTLS() {
38
return;
39
40
// We will assume the alignment is always a power of two.
41
- uintptr_t tlsSize = (app.tls.size + app.tls.align) & -app.tls.align;
+ uintptr_t tlsSize = app.tls.size & -app.tls.align;
42
+ if (tlsSize != app.tls.size)
43
+ tlsSize += app.tls.align;
44
45
// Per the x86_64 TLS ABI, the entry pointed to by the thread pointer is the
46
// address of the TLS block. So, we add more size to accomodate this address
0 commit comments