linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: variables
Date: Sat, 24 Aug 2002 13:54:42 +0200	[thread overview]
Message-ID: <3D677402.EA49BF30@wp.pl> (raw)
In-Reply-To: 20020823102208Z318729-685+36030@vger.kernel.org

RCS wrote:
> 
> Hi all,
> 
>   Can anyone explain me how global and local variables from C are treated in
> assembler?
>   Is that write that local variables are storage in the stack?

Global variables are likely to be placed in data segment and all local -
pushed on the stack. But i think it really depends on C compiler how it
handles all Your data. If the program is tiny, a C compiler may all Your
data push on the stack - i don't know that C standard says that all Your
global data must be placed in data segment (i suppose it doesn't say)
but it seems that it works in that way for most of programs (not
hello-like).

-- 
Maciej Hrebien


  reply	other threads:[~2002-08-24 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-23 10:26 variables RCS
2002-08-24 11:54 ` Maciej Hrebien [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-08-23 11:27 variables RCS

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=3D677402.EA49BF30@wp.pl \
    --to=m_hrebien@wp.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 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).