From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Tue, 02 Nov 2010 10:04:25 +0100 Subject: [U-Boot] arm: wrong Relocation and not cleared BSS In-Reply-To: References: <4CCC18E7.8080708@ahsoftware.de> <4CCC1F6C.7040603@free.fr> <4CCC3697.1060703@gmail.com> <4CCC7A2D.3040204@ahsoftware.de> <4CCC8559.1050603@ahsoftware.de> <4CCD1F22.3080807@denx.de> <4CCFB07C.3040108@free.fr> <4CCFC092.3090707@free.fr> Message-ID: <4CCFD419.90400@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 02/11/2010 09:53, V, Aneesh a ?crit : > My .rel.dyn was not empty even before taking your fix. > > This is what puzzled me. When I dumped the ELF headers with 'objdump -h' > ..rel.dyn seemed to have some content: Please see the diff of objdump's > output before and after applying your patch. > > Please note that .rel.dyn was there even without the patch having the > same size but at a different offset. > > So, this is what it looks like to me: > Even when our rule in .lds was not correct the linker generated > ..rel.dyn section by default putting together the 'rel*' sections that > were not covered by any rules. But since it didn't use our rule for > this, the labels associated with our rule indicated zero size. Correct: the linker dumped the ununsed .rel* input sections so you can see them, but they were outside of _rel_dyn_start / _rel_dyn_end, so for all useful purposes, we can say that .rel.dyn was empty. What was not empty was some other place in the binary that was not .rel.dyn as such. > We did not face the second issue because we are loading the entire > u-boot.bin using a separate preloader. Ok. > Best regards, > Aneesh Amicalement, -- Albert.