[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclibc-cvs
Subject:    [uClibc-cvs] CVS update of uClibc/libc/misc/internals (__uClibc_main.c)
From:       andersen () codepoet ! org (Erik Andersen)
Date:       2004-07-28 8:52:54
Message-ID: 20040728145252.40386B4198 () codepoet ! org
[Download RAW message or body]

    Date: Wednesday, July 28, 2004 @ 08:52:52
  Author: andersen
    Path: /var/cvs/uClibc/libc/misc/internals

Modified: __uClibc_main.c (1.33 -> 1.34)

Do not grovel about in the ELF header for the page size when
running on uClinux, which at runtime uses the FLAT file format.


Index: uClibc/libc/misc/internals/__uClibc_main.c
diff -u uClibc/libc/misc/internals/__uClibc_main.c:1.33 uClibc/libc/misc/internals/__uClibc_main.c:1.34
--- uClibc/libc/misc/internals/__uClibc_main.c:1.33	Tue May 11 05:35:10 2004
+++ uClibc/libc/misc/internals/__uClibc_main.c	Wed Jul 28 08:52:51 2004
@@ -123,10 +123,10 @@
 __uClibc_start_main(int argc, char **argv, char **envp,
 	void (*app_init)(void), void (*app_fini)(void))
 {
+    /* Pull stuff from the ELF header when possible */
+#ifdef __ARCH_HAS_MMU__
     unsigned long *aux_dat;
     Elf32_auxv_t auxvt[AT_EGID + 1];
-
-    /* Pull stuff from the ELF header when possible */
     aux_dat = (unsigned long*)envp;
     while (*aux_dat) {
 	aux_dat++;
@@ -140,6 +140,9 @@
 	aux_dat += 2;
     }
     _dl_pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : 4096;
+#else
+    _dl_pagesize = 4096;
+#endif
 
     /* If we are dynamically linked the shared lib loader already
      * did this for us.  But if we are statically linked, we need

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic