From: G Anna <drguruolai@eth.net>
To: Alfred Cleve <Alfred.Cleve@t-online.de>
Cc: linux-assembly@vger.kernel.org
Subject: Re: ld error
Date: 28 May 2002 10:57:56 +0530 [thread overview]
Message-ID: <m31ybwsuxv.fsf@wobble.eth.net> (raw)
In-Reply-To: <200205272027.52371.alfred.cleve@t-online.de>
> Date: Mon, 27 May 2002 20:27:52 +0200
> From: Alfred.Cleve@t-online.de (Alfred Cleve)
> Subj: Re: ld error
>
> Hi,
>
> > I am working through 'Linux Assembly "Hello World" Tutorial, CS 200'
> > by Bjorn Chambless. But I am unable to compile the program given in
> > that. Kindly help me.
>
> i suspect that exercise isn't a simple "hello world"-program. It
> seems to me as a nasty trap for lazy students :-))
>
> The module "average" is a subroutine e.g. a "function" which should
> be linked to a given C-Program.
I don't think so, because the given assembly program has a main
function; and the tutorial has given a step by step procedure to
produce the executable.
Inspite of my above statement, I am not very sure of the given
assembly program being complete, basically because it doesn't work!
But it does have a main function.
[ Added as an after-thought: Doesn't the function named 'main' have
any special significance in assembly language programs? ]
(begin-quote)
/* segment registers set up by linked code */
/* beginning of text(code) segment */
.text
.align 4 /* set 4 double-word alignment */
.globl main /* make main global for linker */
.type main,@function /* declare main as a function */
main:
(definition of main snipped)
(end-quote)
If what you say is correct, then I don't think the tutorial serves its
purpose. Already, I am pulling my hairs to understand what is going
on, and now I have got to put up with the caveats that the author
thought to be educational. (No offence meant to the author, its just
my critique of the tutorial.)
> For my first step i'm looking for a readable tutorial to the
> "gas"-assembler.
Simply start from http://www.linuxassembly.org
Cheers,
anna
--
(15) I will never employ any device with a digital countdown. If I find
that such a device is absolutely unavoidable, I will set it to
activate when the counter reaches 117 and the hero is just putting
his plan into operation. - Peter Anspach in "The Top 100 Things
I'd Do If I Ever Became An Evil Overlord"
http://www.eviloverlord.com
next prev parent reply other threads:[~2002-05-28 5:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-27 7:19 ld error G Anna
2002-05-27 18:27 ` Alfred Cleve
2002-05-28 5:27 ` G Anna [this message]
2002-05-28 11:26 ` Brian Raiter
2002-05-28 14:32 ` Robert Plantz
2002-05-28 12:54 ` J.S.Souza
-- strict thread matches above, loose matches on Subject: below --
2002-05-27 18:58 Emmet Ford
2002-05-28 1:51 ` Brian Raiter
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=m31ybwsuxv.fsf@wobble.eth.net \
--to=drguruolai@eth.net \
--cc=Alfred.Cleve@t-online.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.