From f14d34240c7f39b5e01c730c10f72ac075cbc13f Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Sat, 1 Oct 2005 16:24:20 +0000 Subject: Change the order in which '__uClibc_init' is called. In the case of NPTL, some auxillary TLS set up has to happen beforehand. This has been tested for almost two months now and I am tired of chasing it around in my merges. Look in the NPTL trunk if you want more information. --- libc/misc/internals/__uClibc_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index b3876ae15..8b7512b1a 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -242,10 +242,6 @@ __uClibc_main(int (*main)(int, char **, char **), int argc, ElfW(auxv_t) auxvt[AT_EGID + 1]; #endif __libc_stack_end = stack_end; - /* We need to initialize uClibc. If we are dynamically linked this - * may have already been completed by the shared lib loader. We call - * __uClibc_init() regardless, to be sure the right thing happens. */ - __uClibc_init(); __rtld_fini = rtld_fini; @@ -274,6 +270,11 @@ __uClibc_main(int (*main)(int, char **, char **), int argc, aux_dat += 2; } + /* We need to initialize uClibc. If we are dynamically linked this + * may have already been completed by the shared lib loader. We call + * __uClibc_init() regardless, to be sure the right thing happens. */ + __uClibc_init(); + /* Make certain getpagesize() gives the correct answer */ __pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE; -- cgit v1.2.3