This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: = {0} in bss?


On Tue, Aug 22, 2006 at 12:14:24PM -0700, Mike Stump wrote:
> I hate to even bring this up, but...  should things like:
> 
>   int m[1 << 27] = {0};
> 
> be put in .bss?   I'm tempted to say no, if you want that, you have to  
> remove {0}.

Does this answer your question?

`-fno-zero-initialized-in-bss'
     If the target supports a BSS section, GCC by default puts
     variables that are initialized to zero into BSS.  This can save
     space in the resulting code.

     This option turns off this behavior because some programs
     explicitly rely on variables going to the data section.  E.g., so
     that the resulting executable can find the beginning of that
     section and/or make assumptions based on that.

     The default is `-fzero-initialized-in-bss'.

-- 
Daniel Jacobowitz
CodeSourcery


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