public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <slrn83rhgp.57.juergen@monocerus.demon.co.uk> (raw)
Message-ID: <19991130232800.EscTDv4ijulU52TsinaXzE-7iITVH96EU6I94wr466I@z> (raw)
In-Reply-To: <Pine.LNX.4.10.9911251329570.6867-100000@willamette.eecs.umich.edu>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

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 /

  reply	other threads:[~1999-11-30 23:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-25 10:50 Hsien-Hsin Lee
1999-11-25 15:58 ` Juergen Heinzl [this message]
1999-11-30 23:28   ` Juergen Heinzl
1999-11-30 23:28 ` Hsien-Hsin Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrn83rhgp.57.juergen@monocerus.demon.co.uk \
    --to=juergen@monocerus.demon.co.uk \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).