Re: [uCsimm] compiled program with elf-gcc doesn't work

From: cedric.delfosse@freealter.com
Date: Fri Jun 22 2001 - 09:45:14 EDT


Hello

I anwer to myself.
I just forgot to add the -m68000 to the gcc flags for the linking. (*grmpf*)

Have a good day.

CÚdric Delfosse
Free & Alter Soft (http://freealter.com)

Quoting cedric.delfosse@freealter.com:

> Hello to everyone
>
> I'm trying to make run lua (www.lua.org, a rather small script
> interpreter) on
> my uCsimm.
>
> The makefile transformation is trivial, and all seems to compile well.
> CFLAGS are -O2 -m68000 -msep-data -fomit-frame-pointer -pedantic -Wall
> For the linking, I add -Wl,-elf2flt for the elf to flat conversion.
> I export FLTFLAGS="-v" and see no error during the conversion.
>
> When I try to run lua, I get this error:
> unknown fault
>
> I have #defined DEBUG in the kernel (uClinux 2.0.x from CVS) in
> fs/binfmt_flat.c
> to see what happened.
> Here is a copy:
>
> # lua
>
> BINFMT_FLAT: Loading file: 7eb630
> Free pages: 7116kB
> ( 1*4kB 1*8kB 0*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 6*1024kB =
> 7116kB,
> )BINFMT_FLAT: Allocated:
> code 0x740018 Ox159c0
> data 0x7559d8 Ox3490
> bss - Ox494
> stack - Ox4058
> Free pages: 6888kB
> ( 2*4kB 0*8kB 0*16kB 1*32kB 1*64kB 1*128kB 0*256kB 1*512kB 6*1024kB =
> 6888kB,
> )Load lua: TEXT=740058-7559d8 DATA=7559d8-758e68 BSS=758e68-75d354
> p=75d350
> putstringarray(1)
> put_string 'lua'
> p2=75d34c
> p(filename)=75d34c
> putstringarray(4)
> put_string 'TERM=vt100'
> p2=75d341
> put_string 'SHELL=/bin/sh'
> p2=75d333
> put_string 'HOME=/'
> p2=75d32c
> put_string 'PATH=:/bin:/usr/bin'
> p2=75d318
> p(envp)=75d318
> putstringarray(1)
> put_string 'lua'
> p2=75d314
> p(argv)=75d314
> p(create_flat_tables)=75d2ec
> arg_start = 75d314
> arg_end = 75d318
> env_start = 75d318
> env_end = 75d34c
> Free pages: 6888kB
> ( 2*4kB 0*8kB 0*16kB 1*32kB 1*64kB 1*128kB 0*256kB 1*512kB 6*1024kB =
> 6888kB,
> )unknown fault
> PC[00000000] SSP[007ccff8] USP[0075d2e0] BootstrapSP[0001fbc6]
>
> D0 D1 D2 D3 D4 D5 D6 D7
> 00000000 007807e0 007d040c 007d03a8 007d03a8 007559d8 00000000 00000001
> A0 A1 A2 A3 A4 A5 A6
> 0000ffde 007d03f8 007807e4 00780029 007d011e 007559d8 0075d2e4
> B$
>
> So it looks like the flat binary has been loaded without any problems,
> and it
> crashes during its execution.
> I don't understand where could be the problem. Did I miss something ?
>
> Note that I have successfully compiled and launched a 300ko program on
> my
> uCsimm, the text based web browser "links".
>
> Any suggestions ?
>
> Thanks to all
>
> CÚdric Delfosse
> Free & Alter Soft (http://freealter.com)
> This message resent by the ucsimm@uclinux.com list server
> http://www.uClinux.com/
>
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST