From 5e4db8d16837b2532eca14cb66002e4235fcf519 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Tue, 9 Jun 2009 21:45:53 +0100 Subject: [PATCH] Allocate a larger TLS segment, so that initialising libpthread.so works Normally on Linux, the TLS segment is unbounded. Before, under NaCl, only 100 bytes were allocated. Increase this to 4k so that __pthread_initialize_minimal works; it does "mov %eax,%gs:0x16c". This is not a proper fix: we should really allocate upto the top of address space. --- nptl/sysdeps/i386/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index 3537123b1c..403748e64e 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -208,7 +208,7 @@ union user_desc_init INIT_SYSINFO; \ static int (*nacl_tls_init)(void const *buf, size_t size) = \ NACL_SYSCALL_ADDR(NACL_sys_tls_init); \ - _result = nacl_tls_init (_thrdescr, 100); \ + _result = nacl_tls_init (_thrdescr, 0x1000); \ _result == 0 ? NULL \ : "tls_init failed when setting up thread-local storage\n"; }) -- 2.11.4.GIT