summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/tls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/tls.c b/lib/libc/gen/tls.c
index 7a3ebfe..6948912 100644
--- a/lib/libc/gen/tls.c
+++ b/lib/libc/gen/tls.c
@@ -109,6 +109,8 @@ _rtld_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign)
Elf_Addr *dtv;
size = tls_static_space;
+ if (size < tcbsize)
+ size = tcbsize;
tls = malloc(size);
dtv = malloc(3 * sizeof(Elf_Addr));
OpenPOWER on IntegriCloud