public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Uninitialized data on Darwin/MacOS (gcc 4.3)
@ 2008-05-20 12:10 markus.stuermer
  0 siblings, 0 replies; only message in thread
From: markus.stuermer @ 2008-05-20 12:10 UTC (permalink / raw)
  To: gcc

I noticed that GCC 4.3 seems to put unitialized data like predefined one into the data segment, leading to unnecessarily huge object files and binaries. The GCC 4.01 bundled with MacOS 10.5 seems to handle it in a better way.

GCC 4.3 stores uninitialized data as "(__DATA,__data) external", while 4.01 uses "(__DATA,__common) external".

Using "-fconserve-space" seems to be the only workaround for GCC 4.3 on Darwin at the moment (storing as "(common) (alignment 2^5) external").

I'm more used to the ELF format, but from what I've found on the web the Mach-0 file format should be well able of defining BSS type data.

Is there a configuration switch or compiler flag I overlooked? Should this behavior be regarded as a bug and be reported?

Regards, Markus












^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-20 12:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-20 12:10 Uninitialized data on Darwin/MacOS (gcc 4.3) markus.stuermer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).