summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__uClibc_main.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-10-01 16:24:20 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-10-01 16:24:20 +0000
commitf14d34240c7f39b5e01c730c10f72ac075cbc13f (patch)
tree1714bb3749652fb8960f6f13572f93aa540ead39 /libc/misc/internals/__uClibc_main.c
parent812cc95678da2eac1a405996a94ffc8bc239d9b9 (diff)
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.
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
-rw-r--r--libc/misc/internals/__uClibc_main.c9
1 files 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;