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