[299] in linux-net channel archive
DIP and ELF
daemon@ATHENA.MIT.EDU (Perry F Nguyen)
Wed May 10 03:39:37 1995
Date: Tue, 9 May 1995 23:29:02 -0700 (PDT)
From: Perry F Nguyen <pfnguyen@Viet.COM>
Reply-To: pfnguyen@netcom.com
To: linux-net@vger.rutgers.edu
cc: linux-gcc@vger.rutgers.edu
Well, I've tried as much as I can as well as as hard as I can to try to
get dip to compile properly (I suck at C anyway) under ELF. I already
have dip compiled under a.out, but would much rather have it for ELF, and
have been unable to find it anywhere so far.
What I am using is gcc-2.6.4-950430, libc-5.0.7, and the latest binutils
from HJ Lu. The version of DIP I am trying to compile is 3.3.7n-uri
What happens at link time is if I use crt0.o ... it'll bomb out, and if I
use crt1.o ... it'll bomb out attempting to run it.
A log of what happens follows --
This attempt is when trying to link with crt0.o
viet:/tmp/pfnguyen/dip-3.3.7n> make
ld -s -qmagic -o dip /usr/lib/crt0.o main.o config.o daemon.o tty.o
attach.o term.o modem.o command.o login.o protocols.a `gcc
--print-libgcc-file-name` -lc
ld: warning: cannot find entry symbol _start; defaulting to 08001390
/usr/lib/crt0.o(.text+0x1): undefined reference to `___load_shared_libraries'
/usr/lib/crt0.o(.text+0x12): undefined reference to `____brk_addr'
/usr/lib/crt0.o(.text+0x1b): undefined reference to `___environ'
/usr/lib/crt0.o(.text+0x22): undefined reference to `___fpu_control'
/usr/lib/crt0.o(.text+0x28): undefined reference to `___setfpucw'
/usr/lib/crt0.o(.text+0x30): undefined reference to `___libc_init'
/usr/lib/crt0.o(.text+0x35): undefined reference to `_main'
/lib/libc.so.5.0.7: undefined reference to `__environ'
/lib/libc.so.5.0.7: undefined reference to `environ'
make: *** [dip] Error 1
This attempt is with crt1.o
viet:/tmp/pfnguyen/dip-3.3.7n> make
ld -s -qmagic -o dip /usr/lib/crt1.o main.o config.o daemon.o tty.o
attach.o term.o modem.o command.o login.o protocols.a `gcc
--print-libgcc-file-name` -lc
DIP is built successfully.
viet:/tmp/pfnguyen/dip-3.3.7n> ls -l dip
-rwxr-xr-x 1 pfnguyen lusers 52329 May 9 23:26 dip
viet:/tmp/pfnguyen/dip-3.3.7n> file dip
dip: ELF 32-bit LSB executable, Intel 80386, version 1 - stripped
viet:/tmp/pfnguyen/dip-3.3.7n> strace ./dip
strace: exec: No such file or directory
viet:/tmp/pfnguyen/dip-3.3.7n> ./dip
./dip: Command not found.
And this is an attempt without crt?.o at all
viet:/tmp/pfnguyen/dip-3.3.7n> make
ld -s -qmagic -o dip main.o config.o daemon.o tty.o attach.o term.o
modem.o command.o login.o protocols.a `gcc --print-libgcc-file-name` -lc
ld: warning: cannot find entry symbol _start; defaulting to 08001390
/lib/libc.so.5.0.7: undefined reference to `__environ'
/lib/libc.so.5.0.7: undefined reference to `environ'
make: *** [dip] Error 1
I've been trying to get this working for several hours, but have been
unsuccessful so far. If anyone already has this compiled, or a patched,
I'd be very grateful.
TIA
--
(2) A lot of time has been wasted arguing over what came first
-- the chicken or the egg. It was undoubtedly the
rooster.
- Perry Nguyen, <pfnguyen@Netcom.COM>