From: Mateusz Kocielski <shm@nation.pl>
To: Brian Raiter <breadbox@muppetlabs.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: Problem with nasm
Date: Sun, 27 Mar 2005 00:58:46 +0100 [thread overview]
Message-ID: <4245F736.1070600@nation.pl> (raw)
In-Reply-To: <16965.62791.870164.701108@eidolon.muppetlabs.com>
Brian Raiter wrote:
> Try compiling with "gcc -nostartfiles -o exit exit.o" instead, and see
> if you get different results. If so, then gcc probably knows of some
> extra arguments that ld needs to produce a proper executable. Whenever
> feasible, you should let gcc do the linking for you instead of
> invoking ld directly. ld can take a lot of cmdline arguments.
>
> The "-nostartfiles" option will tell gcc not to supply a _start
> routine, and not to link in the usual C libraries. You will probably
> still get a slightly bigger executable than if you invoked ld
> directly, but not by much.
$ nasm -felf -o exit.o exit.s
$ gcc -nostartfiles -o exit exit.o
$ strace ./exit
.
.
.
_exit(0) = ?
It works ok, thank you very much.
--
Shm - shm ( at ) irc7 ( dot ) pl
EKG: 2099452 JID: shm@chrome.pl
homepage : http://shm.nation.pl/
next prev parent reply other threads:[~2005-03-26 23:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-24 23:08 Unable to access memory address J.
2005-03-25 9:46 ` Frank Kotler
2005-03-26 11:18 ` J.
2005-03-26 21:15 ` Problem with nasm Mateusz Kocielski
2005-03-26 22:15 ` Frank Kotler
2005-03-26 23:50 ` Brian Raiter
2005-03-26 23:58 ` Mateusz Kocielski [this message]
2005-04-11 3:39 ` Bug in Gas? Randall Hyde
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=4245F736.1070600@nation.pl \
--to=shm@nation.pl \
--cc=breadbox@muppetlabs.com \
--cc=linux-assembly@vger.kernel.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 NNTP newsgroup(s).