how to get typesizes w/o running binary ?
Dimitry Andric
dimitry@andric.com
Thu Nov 23 00:07:00 GMT 2006
Enrico Weigelt wrote:
> I'd like to probe typesizes.
> Simply building and running some little test program is trivial.
> But I'd like to do it *without* running an test program.
Something like a .c file with two lines:
#include <stddef.h>
size_t siz = sizeof(whatever);
compile it using -S, and check the assembler output, e.g.:
.file "sizetest.c"
.globl siz
.data
.align 4
.type siz, @object
.size siz, 4
siz:
.long 8 <--- there's your info :)
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list