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

Jerry Van Baren gerald.vanbaren at smiths-aerospace.com
Mon Nov 6 21:13:08 CET 2006

Scott Wood wrote:
> Jerry Van Baren wrote:
>> Does the linker create proper zero initialization?
> Yes.

[snipped the rest of the "yes" answers - good to know this, thank you]

> The main things that would take effort are changing all the board linker 
> scripts, and finding large BSS allocations and changing them to be 
> dynamically allocated so they don't take up space in flash.
> The benefit is that bss-related bugs in the pre-RAM code go away and 
> stay away, and that ugliness such as having to specify __attribute__ 
> ((section ("data"))) whenever the value is zero also goes away.
> -Scott

OK, but you are trading one fixed bss-related bug in the pre-RAM code 
for a larger u-boot image and more complexity.

Pre-RAM code is short and sweet and thus has a pretty limited 
opportunity for bugs.  On the other hand, changing all the board linker 
scripts takes effort and regression testing by all the board 
maintainers.  Finding large bss allocations and changing them to be 
dynamically allocated sounds like a job that is initially large and 
ultimately never ending.
I'm afraid the audience here isn't very sympathetic.

Best regards,

More information about the U-Boot mailing list