Failure to boot into cross built environment (iWMMXt NPTL EABI)

Steven Newbury s_j_newbury@yahoo.co.uk
Mon Apr 24 22:12:00 GMT 2006


--- Steven Newbury <s_j_newbury@yahoo.co.uk> wrote:

> 
> --- Steven Newbury <s_j_newbury@yahoo.co.uk> wrote:
> 
> > I rebuilt my toolchain and userspace again from scratch this time using
> > glibc-2.4-r2.
> > 
> > The kernel is configured for EABI *only*. Kernel version is 2.6.16 +
> patches
> > for hardware support from http://www.rpsys.net/openzaurus/patches/archive/
> > 
> > Userspace is all built with -mabi=aapcs
> > 
> > On booting it just hangs while running init.  Looks like a syscall isn't
> > returning perhaps?  Sysrq works and typing produces output on the screen so
> > the
> > kernel is running.
> > 
> > I am now rebuilding with old abi compatiblity and booting into another
> distro
> > (pdaXrom) with the same kernel.  I'll then see if I can run any EABI
> binaries
> > that way.
> > 
> This is interesting.  It seems that libgcc_s.so isn't being installed/built
> by
> the cross compilation of the native gcc for the target and it isn't copied
> into
> the target /lib from the build machines /usr/lib/gcc/..
> 
Using /mnt/cf/lib/ld-linux.so.3 --library-path /mnt/cf/lib /mnt/cf/bin/... I
can get dynamically linked binaries to work.  I can't chroot because of the
EABI/old ABI userspaces.

I don't seem to be able to compile a statically linked bash! Does anybody have
one floating around that I could use, EABI obviously?

When linking with:

arm-iwmmxt-linux-gnueabi-gcc -L./builtins -L./lib/readline -L./lib/readline
-L./lib/glob -L./lib/tilde -L./lib/malloc -L./lib/sh -static -static -rdynamic 
-Os -mabi=aapcs -march=iwmmxt -mcpu=iwmmxt -fomit-frame-pointer -ffast-math
-ftree-vectorize -pipe -o bash shell.o eval.o y.tab.o general.o make_cmd.o
print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o
flags.o nojobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o
unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o
braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o
findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lsh
-lreadline -lhistory -lcurses -lglob -ltilde -lmalloc

I get:

/usr/arm-iwmmxt-linux-gnueabi/usr/lib/libc.a(malloc.o): In function `free':
malloc.c:(.text+0x1704): multiple definition of `free'
./lib/malloc/libmalloc.a(malloc.o):malloc.c:(.text+0x434): first defined here
/usr/lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/../../../../arm-iwmmxt-linux-gnueabi/bin/ld:
Warning: size of symbol `free' changed from 16 in
./lib/malloc/libmalloc.a(malloc.o) to 228 in
/usr/arm-iwmmxt-linux-gnueabi/usr/lib/libc.a(malloc.o)
/usr/arm-iwmmxt-linux-gnueabi/usr/lib/libc.a(malloc.o): In function `malloc':
malloc.c:(.text+0x30f0): multiple definition of `malloc'
./lib/malloc/libmalloc.a(malloc.o):malloc.c:(.text+0xb34): first defined here
/usr/lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/../../../../arm-iwmmxt-linux-gnueabi/bin/ld:
Warning: size of symbol `malloc' changed from 16 in
./lib/malloc/libmalloc.a(malloc.o) to 552 in
/usr/arm-iwmmxt-linux-gnueabi/usr/lib/libc.a(malloc.o)
/usr/arm-iwmmxt-linux-gnueabi/usr/lib/libc.a(malloc.o): In function `realloc':
malloc.c:(.text+0x35c8): multiple definition of `realloc'
./lib/malloc/libmalloc.a(malloc.o):malloc.c:(.text+0xf3c): first defined here
/usr/lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/../../../../arm-iwmmxt-linux-gnueabi/bin/ld:
Warning: size of symbol `realloc' changed from 36 in
./lib/malloc/libmalloc.a(malloc.o) to 516 in
/usr/arm-iwmmxt-linux-gnueabi/usr/lib/libc.a(malloc.o)

Or if I use --without-bash-malloc, I get:
arm-iwmmxt-linux-gnueabi-gcc -L./builtins -L./lib/readline -L./lib/readline
-L./lib/glob -L./lib/tilde  -L./lib/sh -static -static -rdynamic  -Os
-mabi=aapcs -march=iwmmxt -mcpu=iwmmxt -fomit-frame-pointer -ffast-math
-ftree-vectorize -pipe -o bash shell.o eval.o y.tab.o general.o make_cmd.o
print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o
flags.o nojobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o
unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o
braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o
findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lsh
-lreadline -lhistory -lcurses -lglob -ltilde

Resulting in:

./lib/sh/libsh.a(shmatch.o): In function `sh_regmatch':
shmatch.c:(.text+0x184): undefined reference to `sh_xfree'
shmatch.c:(.text+0x194): undefined reference to `sh_xfree'


Steve


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list