
6 Nov
2006
6 Nov
'06
7:08 p.m.
Jerry Van Baren wrote:
You don't understand, u-boot _is_ what zeros bss so, until u-boot is running enough to zero bss, bss will be random garbage.
If BSS were merged into the DATA segment, then the compiler would be the one that zeros BSS. Basically, BSS would go away, and all global variables (static or otherwise) would be placed into DATA. They would be initialized to zeros by the compiler, and when the image is burned into flash, that image would have zeros in those memory locations.
This would also allow us to delete the BSS-initialization code in U-Boot.
I'm not advocating that we should implement this idea. I just wanted to clarify things.
--
Timur Tabi
Linux Kernel Developer @ Freescale