From mboxrd@z Thu Jan 1 00:00:00 1970 From: juergen@monocerus.demon.co.uk (Juergen Heinzl) To: help-gcc@gnu.org Subject: Re: linker issue (a.out is not running.) Date: Thu, 25 Nov 1999 15:58:00 -0000 Message-id: References: X-SW-Source: 1999-11/msg00393.html In article < Pine.LNX.4.10.9911251329570.6867-100000@willamette.eecs.umich.edu >, Hsien-Hsin Lee wrote: > >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 Try gcc -v -Wl,-v to see what is linked in as crt1.o is not enough, especially if shared libraries and the standard libc are required. [...] Cheers, Juergen -- \ Real name : Jürgen Heinzl \ no flames / \ EMail Private : juergen@monocerus.demon.co.uk \ send money instead / From mboxrd@z Thu Jan 1 00:00:00 1970 From: juergen@monocerus.demon.co.uk (Juergen Heinzl) To: help-gcc@gnu.org Subject: Re: linker issue (a.out is not running.) Date: Tue, 30 Nov 1999 23:28:00 -0000 Message-ID: References: X-SW-Source: 1999-11n/msg00393.html Message-ID: <19991130232800.EscTDv4ijulU52TsinaXzE-7iITVH96EU6I94wr466I@z> In article < Pine.LNX.4.10.9911251329570.6867-100000@willamette.eecs.umich.edu >, Hsien-Hsin Lee wrote: > >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 Try gcc -v -Wl,-v to see what is linked in as crt1.o is not enough, especially if shared libraries and the standard libc are required. [...] Cheers, Juergen -- \ Real name : Jürgen Heinzl \ no flames / \ EMail Private : juergen@monocerus.demon.co.uk \ send money instead /