On Wednesday 18 March 2009 05:05:10 Groleo Marius wrote: > On Tue, Mar 17, 2009 at 11:55 AM, Groleo Marius <[email protected]> wrote: > > Hi list, > > I have a uClibc on a coldfire m547x board. > > The kernel boots fine but the loading process halts somewhere in ld. > > I've compiled uClibc with debugging so here is the output. > > ------------------------------------------- > > VFS: Mounted root (nfs filesystem). > > ELF header=0x80004000 > > First Dynamic section entry=0x80010340 > > Scanning DYNAMIC section > > Done scanning DYNAMIC section > > About to do library loader relocations > > Done relocating ldso; we can now use globals and make function calls! > > Step0 > > ------------------------------------------- > > I added "Step0" in dl-startup.c ( see below ). > > Any ideas why is this happening > > or how can I debug this further ? > > > > > > ldso/ldso/dl-startup.c > > 309 SEND_STDERR_DEBUG("Step0\n"); > > 310 __rtld_stack_end = (void *)(argv - 1); > > 311 SEND_STDERR_DEBUG("Step1\n"); > > > > -- > > Regards, Groleo! > > > It looks like the GOT table was not initialized properly. > I got it to pass over that assignment but it's stucked in a mmap now. > Anyone knows if there are any problem with coldfire mmap ? > > =========================================== > Looking up port of RPC 100005/1 on 10.32.0.120 > VFS: Mounted root (nfs filesystem). > ELF header=0x80004000 > First Dynamic section entry=0x800102ac > Scanning DYNAMIC section > Done scanning DYNAMIC section > About to do library loader relocations > machine addr preloaded from outside > Done relocating ldso; we can now use globals and make function calls! > Step0 > Step1 > _dl_get_ready_to_run:171: Cool, ldso survived making function calls > _dl_malloc:919: mmapping more memory > _dl_get_ready_to_run:353: Lib Loader: (0x80004000) /lib/ld-uClibc.so.0 > _dl_get_ready_to_run:291: calling mprotect on the application program > status:4294967295 p_offset:45056 MAP_FLAGS:18 FLAGS:3 size:876 > tryaddr:2147627008 > status:4294967295 2147627008 > /sbin/init:583: can't map '/lib/libgcc_s.so.2' > status:4294967295 p_offset:45056 MAP_FLAGS:18 FLAGS:3 size:876 > tryaddr:2147627008 > status:4294967295 2147627008 > /sbin/init:583: can't map '/lib/libgcc_s.so.2' > status:4294967295 p_offset:45056 MAP_FLAGS:18 FLAGS:3 size:876 > tryaddr:2147627008 > status:4294967295 2147627008 > /sbin/init:583: can't map '/usr/lib/libgcc_s.so.2' > /sbin/init: can't load library 'libgcc_s.so.2' > Kernel panic - not syncing: Attempted to kill init! > =========================================== > can you try this patch from glibc
-- Khem Raj
Index: libc/sysdeps/linux/m68k/Makefile.arch =================================================================== --- libc/sysdeps/linux/m68k/Makefile.arch (revision 25739) +++ libc/sysdeps/linux/m68k/Makefile.arch (working copy) @@ -7,6 +7,6 @@ CSRC := brk.c __syscall_error.c syscall.c -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S +SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S mmap.S setjmp.S vfork.S include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch Index: libc/sysdeps/linux/m68k/mmap.S =================================================================== --- libc/sysdeps/linux/m68k/mmap.S (revision 0) +++ libc/sysdeps/linux/m68k/mmap.S (revision 0) @@ -0,0 +1,43 @@ +/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <sysdep.h> + + .text +ENTRY (__mmap) + + move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */ + + lea 4(%sp), %a0 /* Address of args is 1st arg. */ + move.l %a0, %d1 + + /* Do the system call trap. */ + trap #0 + + /* Kludge: negative numbers are among the legal return values. + If %d0 is between -4096 and 0 then there was an error. */ + cmp.l #-4096, %d0 + jhi SYSCALL_ERROR_LABEL + + /* Successful; return the syscall's value. Copy it to %a0 because + mmap is declared to return a pointer. */ + move.l %d0, %a0 + rts +PSEUDO_END (__mmap) + +weak_alias (__mmap, mmap)
_______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
