From f1cdc0b850fb53fb4a94ca4c49039bb4c8a22228 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Jan 2006 01:00:00 +0000 Subject: fix previous commit so that __uClibc_init() is run for non-mmu cases again as report by Thomas in Bug 618 --- libc/misc/internals/__uClibc_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc/misc/internals/__uClibc_main.c') diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 0a39d602f..33ac42e67 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -217,8 +217,8 @@ __uClibc_main(int (*main)(int, char **, char **), int argc, __environ = &argv[argc]; } - /* Pull stuff from the ELF header when possible */ #ifdef __ARCH_HAS_MMU__ + /* Pull stuff from the ELF header when possible */ aux_dat = (unsigned long*)__environ; while (*aux_dat) { aux_dat++; @@ -231,12 +231,14 @@ __uClibc_main(int (*main)(int, char **, char **), int argc, } aux_dat += 2; } +#endif /* 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(); +#ifdef __ARCH_HAS_MMU__ /* 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