This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]