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]

Re: Automaticly eliminating redundant zero initialisers


----- Original Message -----
From: George Anzinger <george@pioneer.net>
To: Tigran Aivazian <tigran@veritas.com>
Cc: Graham Stoney <greyham@research.canon.com.au>; Russell King
<rmk@arm.linux.org.uk>; Linux kernel mailing list
<linux-kernel@vger.rutgers.edu>; <gcc@gcc.gnu.org>
Sent: Monday, May 01, 2000 7:30 AM
Subject: Re: Automaticly eliminating redundant zero initialisers



> Soon as you depend on this some OS dude will fill bss with -1s so he can
> tell what was used... or some such.  Seems like a bad idea to depend on
> bss being anything at all.

No.  It makes sense to depend on .bss being zero.  Not depending on .bss
being zero leaves two poor options:

    1.  waste space in the executable image by bloating .data with zeros
    2.  complicate and bloat the code with first-time-only initialization
peppered here and there

I welcome an option for gcc to put zero-initialized objects in .bss, even if
it is just a bandage over the real problem.

Regards,
Brad


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