From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sun, 17 Feb 2013 15:30:51 +0100 Subject: [U-Boot] [PATCH v7 11/19] arm: relocate_code(): Use __image_copy_end for end of relocation In-Reply-To: <544411475.1524096.1361044441422.JavaMail.root@advansee.com> References: <1360961665-10693-1-git-send-email-benoit.thebaudeau@advansee.com> <1360961665-10693-11-git-send-email-benoit.thebaudeau@advansee.com> <20130216194713.07bb9bd1@lilith> <544411475.1524096.1361044441422.JavaMail.root@advansee.com> Message-ID: <20130217153051.70dd0867@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Beno?t, On Sat, 16 Feb 2013 20:54:01 +0100 (CET), Beno?t Th?baudeau wrote: > Hi Albert, > > On Saturday, February 16, 2013 7:47:13 PM, Albert ARIBAUD wrote: > > Hi Beno?t, > > > > On Fri, 15 Feb 2013 21:54:17 +0100, Beno?t Th?baudeau > > wrote: > > > > > Use __image_copy_end instead of __bss_start for the end of the image to > > > relocate. This is the same as commit 033ca72, but applied to all ARM > > > start.S. > > > > What is the benefit of this? I find it more logical for BSS-related > > code to use a BSS-related symbol than an image-copy related symbol. > > I don't see why you are talking about BSS-related code. This piece of code is > just supposed to copy the text and rodata from the source image to its > destination location, before optionally relocating its symbols. BSS has nothing > to do with this, so I find this image-copy symbol more appropriate here. > > But besides the naming, the benefit is also that some linker scripts put some > stuff (e.g. MMU tables used early before jumping to relocated code, or > relocation info) between this __image_copy_end and __bss_start, that does not > have to be copied or relocated, so this patch saves a useless data copy in that > case. Apologies -- this is indeed copy-related, not BSS-related, code, and thus the image-copy related symbol is apt, and your additional note makes it all the more valid. > Best regards, > Beno?t Amicalement, -- Albert.