From: Christian Hildner <christian.hildner@hob.de>
To: Corey Holcomb-Hockin <crsntlvs@ipeg.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: C structures and gas
Date: Thu, 28 Nov 2002 07:15:59 +0100 [thread overview]
Message-ID: <3DE5B49F.26B3285F@hob.de> (raw)
In-Reply-To: 3DD04E99.5080704@ipeg.com
Corey Holcomb-Hockin schrieb:
> What is the best way to access C structures with gas assembly? I
> haven't gotten any good ideas from looking at assembly generated from C
> code. It looks like it keeps track of offsets and the size of
> structures on its own. I would have a hard time keeping track of
> offsets and changing them if the structure changed.
>
> Corey Holcomb-Hockin
>
Have a look how linux does this in the ia64 tree. See
/usr/src/linux/arch/ia64/tools/print_offset.c.
There are three steps:
1. compile print_offsets
2. run print_offsets (creates offsets.h)
3. include offsets.h into *.S
Christian
prev parent reply other threads:[~2002-11-28 6:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-12 0:43 C structures and gas Corey Holcomb-Hockin
2002-11-12 2:51 ` Scott Lanning
2002-11-12 5:56 ` Randall Hyde
2002-11-28 6:15 ` Christian Hildner [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=3DE5B49F.26B3285F@hob.de \
--to=christian.hildner@hob.de \
--cc=crsntlvs@ipeg.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).