From e23872c8db1fb26713b9c15b12686ac7a0077576 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Fri, 1 Mar 2013 14:15:39 +0530 Subject: Set default stack size from program environment New environment variable GLIBC_PTHREAD_DEFAULT_STACKSIZE to do this. --- csu/libc-start.c | 4 ++-- csu/libc-tls.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'csu') diff --git a/csu/libc-start.c b/csu/libc-start.c index 9c4c01d9fd..f53f71c975 100644 --- a/csu/libc-start.c +++ b/csu/libc-start.c @@ -30,7 +30,7 @@ extern int __libc_multiple_libcs; #include #ifndef SHARED # include -extern void __pthread_initialize_minimal (void); +extern void __pthread_initialize_minimal (int, char **, char **); # ifndef THREAD_SET_STACK_GUARD /* Only exported for architectures that don't store the stack guard canary in thread local area. */ @@ -167,7 +167,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), /* Initialize the thread library at least a bit since the libgcc functions are using thread functions if these are available and we need to setup errno. */ - __pthread_initialize_minimal (); + __pthread_initialize_minimal (argc, argv, __environ); /* Set up the stack checker's canary. */ uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random); diff --git a/csu/libc-tls.c b/csu/libc-tls.c index 5fa39eb8d1..4c20bb5531 100644 --- a/csu/libc-tls.c +++ b/csu/libc-tls.c @@ -243,7 +243,7 @@ _dl_tls_setup (void) not used. */ void __attribute__ ((weak)) -__pthread_initialize_minimal (void) +__pthread_initialize_minimal (int argc, char **argv, char **envp) { __libc_setup_tls (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN); } -- cgit v1.2.3-65-gdbad