[U-Boot] arm: wrong Relocation and not cleared BSS

Wolfgang Denk wd at denx.de
Sat Oct 30 18:10:09 CEST 2010


Dear Albert ARIBAUD,

In message <4CCC4161.8000807 at free.fr> you wrote:
>
> Just re-checked the C99 specs, and yes, all static scope vars must be 
> initialized, so I stand corrected as for BSS initialization. I still 
> think, though, that one should not count on a BSS-allocated variable to 
> be zero at program start, and if one wants a variable to be zero, one 
> must initialize it explicitly.

The C standard guarantees that.  And U-Boot guarantees that, after
relocation, we have a standard C execution environment, i. e. a zeroed
BSS.

> Anyway, as I said, the nand_chip[] issue is not, I believe, related to 
> initializing BSS, as the writing and reading both occur after setting up 
> the C environment for running from RAM.

Agreed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I mean, I . . . think to understand you, I just don't know  what  you
are saying ...                        - Terry Pratchett, _Soul Music_


More information about the U-Boot mailing list