Subject: Re: More ELF stuff
To: Ben Harris <bjh21@netbsd.org>
From: Chris Gilbert <chris@paradox.demon.co.uk>
List: port-arm32
Date: 02/11/2001 14:56:09
On Sunday 11 February 2001  2:24 pm, Ben Harris wrote:
> Progress on the ELF front:
>
> I've built a toolchain for arm-unknown-netbsdelf based on the stuff in
> gnu/dist/toolchain (GCC 2.95.2, Binutils 2.10).  With this, I've compiled
> most of the NetBSD userland (statically linked).  Some of this is in
> <URL:ftp://ftp.netbsd.org/arch/arm26/testing/arm-elf-bintest-2001-02-11.tar
>.gz>.

Note dir is actually (is this something to do with anon logins?):
ftp://ftp.netbsd.org/pub/NetBSD/arch/arm26/testing/

> Could someone with an arm32 kernel with EXEC_ELF32 compiled in please
> download this and see if it works?  I'll test it on arm26 when I finally
> get around to going home.

Downloaded and tested:
bash-2.04$ ls
[          csh        echo       ksh        mv         rcp        sleep
cat        date       ed         ln         pax        rm         stty
chio       dd         expr       ls         ps         rmail      sync
chmod      df         hostname   mkdir      pwd        rmdir      test
cp         domainname kill       mt         rcmd       sh
bash-2.04$ ./ls
[          csh        echo       ksh        mv         rcp        sleep
cat        date       ed         ln         pax        rm         stty
chio       dd         expr       ls         ps         rmail      sync
chmod      df         hostname   mkdir      pwd        rmdir      test
cp         domainname kill       mt         rcmd       sh
bash-2.04$ ./pwd
/home/chris/elf/bin
bash-2.04$ ./hostname
brain.buzzbee.freeserve.co.uk
bash-2.04$ ./sleep 20
(20 seconds later as expected :)
bash-2.04$ ./sh
Illegal instruction (core dumped)

gdb doesn't understand elf it seems, so couldn't debug. (ksh and csh also 
core dump)

bash-2.04$ ./echo elf binary in use
elf binary in use
bash-2.04$ ./ps
  PID TT STAT    TIME COMMAND
  207 p0 Is   0:00.56 -bash
21164 p1 Ss   0:01.33 -bash
22138 p1 R+   0:00.02 ./ps

(also did ps -aux, that worked as expected, but the output is a bit big for 
an email...)

So it looks to work enough that the binaries run, however interactive things 
core dump?

Cheers,
Chris