This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Show number of padding bytes in data structures
- From: Frank Winklmeier <frank dot winklmeier at cern dot ch>
- To: binutils at sourceware dot org
- Date: Wed, 02 May 2007 17:52:24 +0200
- Subject: Show number of padding bytes in data structures
- Keywords: CERN SpamKiller Note: -49 Charset: west-latin
Hi,
is there any way of using one of the binutils to show the additional
padding bytes that a compiler inserted into a struct/class to make it
align according to the systems memory alignment rules? Or is this
information lost once the compiler has done its job?
For example, for the following data structure compiled on x64, I would
expect the tool to tell me that the compiler added 4 padding bytes:
class MyData {
int i;
double d;
};
Thanks for any help,
Frank