Huge obj file size with GCC3.2!

Olivier Langlois olanglois@quazal.com
Wed Jul 19 15:37:00 GMT 2006


Hi,

In one of my cpp file, I have to following variable declaration:

#define FONT_DATASIZE	(3 * 1024 * 1024)
u_long128		g_font_cache[FONT_DATASIZE];

and according to objdump, the compiler is reserving close to 50MB in the
obj .data section for this array:

00000300 g     O .data	03000000 g_font_cache

The weird thing is that I have access to 2 other compilers and the 2
other compilers will generate a 12KB obj file for the same TU! They seem
to handle array storage differently as objdump shows:

00000010 g     O .sdata	00000004 g_font_data

Is there a way, an optimization switch or anything that I can do to get
the same result from GCC?

Thank you,
Olivier Langlois
http://www.olivierlanglois.net



More information about the Gcc-help mailing list