public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Amittai Aviram <amittai.aviram@yale.edu>
Cc: gcc-help@gcc.gnu.org
Subject: Re: x86_64 calling conventions and stack frames
Date: Tue, 27 Dec 2011 15:16:00 -0000	[thread overview]
Message-ID: <mcrwr9it5jf.fsf@dhcp-172-18-216-180.mtv.corp.google.com> (raw)
In-Reply-To: <BDAB5D55-0242-4044-8589-72BE25E2E7B7@yale.edu> (Amittai Aviram's	message of "Sat, 24 Dec 2011 02:37:44 -0500")

Amittai Aviram <amittai.aviram@yale.edu> writes:

> I am trying to make sense out of the executable code that GCC (4.4.3)
> is generating for an x86_64 machine running under Ubuntu Linux.  In
> particular, I don't understand how the code keeps track of stack
> frames.

On x86_64 gcc will by default generate unwind tables which can be used
at runtime to unwind the stack.  These unwind tables are stored in the
.eh_frame section.  The format is described in the x86_64 ELF processor
supplement or at http://www.airs.com/blog/archives/460 .

As of gcc 4.6 gcc defaults to this behaviour on i386 as well.

You can change it by using -fno-omit-frame-pointer.

Ian

      parent reply	other threads:[~2011-12-27 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-24 11:02 Amittai Aviram
2011-12-24 19:10 ` Bob Plantz
2011-12-25  0:50   ` Amittai Aviram
2011-12-25 21:31     ` Amittai Aviram
2011-12-27 15:16 ` Ian Lance Taylor [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=mcrwr9it5jf.fsf@dhcp-172-18-216-180.mtv.corp.google.com \
    --to=iant@google.com \
    --cc=amittai.aviram@yale.edu \
    --cc=gcc-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).