From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBCaWXDn21hbm4=?= Date: Fri, 10 May 2013 12:57:21 +0200 Subject: [U-Boot] [PATCH] avr32: fix relocation address calculation In-Reply-To: <20130510112444.4dca773f@lilith> References: <1368005117-8624-1-git-send-email-andreas.devel@googlemail.com> <20130510112444.4dca773f@lilith> Message-ID: <518CD291.703@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On 05/10/2013 11:24 AM, Albert ARIBAUD wrote: > Hi Andreas, > > On Wed, 8 May 2013 11:25:17 +0200, Andreas Bie?mann > wrote: > >> Commit 1865286466a5d0c7f2e3c37632da56556c838e9e (Introduce generic link >> section.h symbol files) changed the __bss_end symbol type from char[] to >> ulong. This led to wrong relocation parameters which ended up in a not working >> u-boot. Unfortunately this is not clear to see cause due to RAM aliasing we >> may get a 'half-working' u-boot then. >> >> Fix this by dereferencing the __bss_end symbol where needed. > > (cc:ing Simon and Tom) > > The dereferencing is correct, so this patch seems good per se (it could > actually have applied when __bss_end was still a char[]). well, as I understood this the __bss_end being a char[] did implicitly take the address when accessing __bss_end (as we do when we have a definition of char foo[2] and we take just 'foo'). But you say here we should reference the address of __bss_end while it was still of type char[]. Sorry, I do not understand that, can you please clarify? Best regards Andreas Bie?mann