This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Structure Alignment
- From: "Sivaguru Sankaridurg" <siva at eternal-systems dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Fri, 11 Oct 2002 11:44:48 -0700
- Subject: Structure Alignment
Hi,
If I have a program that defines a structure ( say struct node { char c; int
i; } ), is there any way that I can get the alignment information for this
structure from objdump OR by using BFD api ?
Note:
* I dont want to use alignof() builtin function, bcos all I have is the name
of the structure as a char*. For example think that I am writing a function
"int GetAlignment(char *typename)", that accepts the typename ("node" in
this case) and returns the alignment required for the type (4 -- in this
case).
Thanks
Siva
----------------------------------------------------------------------------
------------
SpamNet - Stop spam immediately and help me too!
www.cloudmark.com