From: "Marcin Kościelnicki" <markosc@interia.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: argc/argv
Date: Fri, 10 Mar 2006 08:08:29 +0100 [thread overview]
Message-ID: <200603100808.30524.markosc@interia.pl> (raw)
In-Reply-To: <031020060400.159.4410F9E10006CADE0000009F22007613949B9D9A0D0409@comcast.net>
> I am trying to build a system that needs to pick up the command line
> arguments. However, it seems there are two ways to do it.
No, there's only one.
> The old way is that argc and argv elements are on the stack.
And that's the correct way.
> Using gcc 3.4.3, the argc is edi and the pointer for argv is in esi,
> according to the times that I have tried it.
>
> Is this correct????
No. Maybe argc really is in edi and argv in esi, but it can change anytime.
Without warning. You shouldn't ever depend on it. Also, I believe this
behavior should be attributed to both glibc and gcc (and therefore can change
when version of either changes).
Marcin Ko≈õcielnicki
---------------------------------------------------------------------
Toshiba i FIFA World Cup
Wygraj bilety i notebooki z Intel Centrino Duo Mobile Technology
http://link.interia.pl/f1912
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2006-03-10 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-10 4:00 argc/argv glburt
2006-03-10 7:08 ` Marcin Kościelnicki [this message]
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=200603100808.30524.markosc@interia.pl \
--to=markosc@interia.pl \
--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.