From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 06 Nov 2006 14:48:50 -0600 Subject: [U-Boot-Users] Why are some global vars part of the image, and some not? In-Reply-To: <20061106202611.973EC353A60@atlas.denx.de> References: <20061106202611.973EC353A60@atlas.denx.de> Message-ID: <454F9FB2.8090009@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > The concept of BSS for using uninitialized data (meaning: implicitely > initialized to zero) However, with the current u-boot linker scripts (some of them, at least; I'm not going to make a sweeping statement about all 270), data *explicitly* initialized to zero is also going in the bss. Combined with the fact that some C code is executed before the bss is cleared, that is simply evil. > is as old as C and Unix, actualy even older than > that (from IBM 7090 times, IIRC). It is simple, efficient, and > powerful. Your point being? I'm not attacking the concept of a bss, just the use of it in a codebase where C code is executed prior to being able to clear the bss. > I see zero reason to drop it. I have stated the reason. If you prefer an environment that invites bugs and ugly workarounds thereto, then suit yourself. -Scott