This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
linker issue (a.out is not running.)
- To: help-gcc at gnu dot org
- Subject: linker issue (a.out is not running.)
- From: Hsien-Hsin Lee <linear at eecs dot umich dot edu>
- Date: Thu, 25 Nov 1999 13:34:42 -0500
- Newsgroups: gnu.gcc.help
- Organization: University of Michigan EECS
- Xref: wodc7nx0 gnu.gcc.help:1966
Can anyone help me explaining why the binary (on my linux box) generated
by the following command sequence is not working ? Might be my linker
command is incorrect ? (I thought some of previous posts have the similar
issue.) or the object file containing _start (crt1.o) is wrong ?
[ 84 ] tmp -: gcc -S x.c
[ 85 ] tmp -: as -o x.o x.s
[ 86 ] tmp -: ld -o a.out /usr/lib/crt1.o x.o -lc
[ 87 ] tmp -: ./a.out
./a.out: Command not found.
[ 90 ] tmp -: file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically
linked (uses shared libs), not stripped
While this is working...
[ 91 ] tmp -: gcc x.c
[ 92 ] tmp -: ./a.out
LEVEL 0 : ADDR= 0 ADDR= 10 ADDR= 20 ADDR= 40 ADDR= 50 ADDR= 60
LEVEL 1 : ADDR= 0 ADDR= 10 ADDR= 20 ADDR= 40 ADDR= 50 ADDR= 60
LEVEL 2 : ADDR= 0 ADDR= 10 ADDR= 20 ADDR= 40 ADDR= 50 ADDR= 60
LEVEL 0 : ADDR= 0 ADDR= 10 ADDR= 20 ADDR= 40 ADDR= 50 ADDR= 60
LEVEL 1 : ADDR= 0 ADDR= 10 ADDR= 20 ADDR= 40 ADDR= 50 ADDR= 60
LEVEL 2 : ADDR= 0 ADDR= 10 ADDR= 20 ADDR= 40 ADDR= 50 ADDR= 60
[ 93 ] tmp -: file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically
linked (uses shared libs), not stripped
Thanks,
- HH Lee