[U-Boot] [PATCH v7 11/19] arm: relocate_code(): Use __image_copy_end for end of relocation
Benoît Thébaudeau
benoit.thebaudeau at advansee.com
Sat Feb 16 20:54:01 CET 2013
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
> <benoit.thebaudeau at advansee.com> 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.
Best regards,
Benoît
More information about the U-Boot
mailing list