This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Automaticly eliminating redundant zero initialisers
- To: "George Anzinger" <george at pioneer dot net>,"Tigran Aivazian" <tigran at veritas dot com>
- Subject: Re: Automaticly eliminating redundant zero initialisers
- From: "Bradley D. LaRonde" <brad at ltc dot com>
- Date: Mon, 1 May 2000 08:03:47 -0400
- Cc: "Graham Stoney" <greyham at research dot canon dot com dot au>,"Russell King" <rmk at arm dot linux dot org dot uk>,"Linux kernel mailing list" <linux-kernel at vger dot rutgers dot edu>,<gcc at gcc dot gnu dot org>
- References: <Pine.LNX.4.21.0005011126350.1079-100000@saturn.homenet> <390D6ABD.CCC9956D@pioneer.net>
----- 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