From: Wolfgang Denk Date: Sat, 30 Oct 2010 18:10:09 +0200 Subject: [U-Boot] arm: wrong Relocation and not cleared BSS In-Reply-To: <4CCC4161.8000807@free.fr> References: <4CCC18E7.8080708@ahsoftware.de> <4CCC1F6C.7040603@free.fr> <4CCC218E.706@ahsoftware.de> <4CCC242C.8070303@free.fr> <20101030143917.042051522C0@gemini.denx.de> <4CCC4161.8000807@free.fr> Message-ID: <20101030161009.F28131522C0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Albert ARIBAUD, In message <4CCC4161.8000807@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_