[U-Boot-Users] Why are some global vars part of the image, and some not?

Scott Wood
2006-11-06T20:48:50Z

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