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

Albert ARIBAUD albert.aribaud at free.fr
Sat Oct 30 18:01:37 CEST 2010


Le 30/10/2010 16:39, Wolfgang Denk a écrit :
> Dear Albert ARIBAUD,
>
> In message<4CCC242C.8070303 at free.fr>  you wrote:
>>
>> You mean the rule is not respected for u-boot? then you should point out
>> (or better yet, submit a patch to fix) parts of code which assume BSS is
>
> It's a requirement of a standard C execution environment. BSS must
> _always_ be cleared.

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.

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.

> Best regards,
>
> Wolfgang Denk

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list