[U-Boot] [PATCH 2/4] arm: make __image_copy_{start, end} compiler-generated

Benoît Thébaudeau
2013-05-11T17:52:17Z

Hi Albert,

On Saturday, May 11, 2013 10:02:48 AM, Albert ARIBAUD wrote:
> Hi Beno?t,
>
> On Sat, 11 May 2013 02:25:02 +0200 (CEST), Beno?t Th?baudeau
> <benoit.thebaudeau@advansee.com> wrote:
>
> > Hi Albert,

[...]

> > > diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds
> > > b/arch/arm/cpu/arm1136/u-boot-spl.lds
> > > index 8296e5d..04fc881 100644
> > > --- a/arch/arm/cpu/arm1136/u-boot-spl.lds
> > > +++ b/arch/arm/cpu/arm1136/u-boot-spl.lds
> > > @@ -37,7 +37,6 @@ SECTIONS
> > > {
> > > .text :
> > > {
> > > - __start = .;
> > > arch/arm/cpu/arm1136/start.o (.text*)
> > > *(.text*)
> > > } >.sram
> > > @@ -48,7 +47,9 @@ SECTIONS
> > > . = ALIGN(4);
> > > .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
> > > . = ALIGN(4);
> > > +
> > > __image_copy_end = .;
> >
> > Why aren't all linker scripts treated equally?
> >
> > Here, start.S is still used, so '*(.__image_copy_end)' and the related
> > stuff
> > should be like what you did for arch/arm/cpu/u-boot.lds below. Or am I
> > missing
> > something?
> >
> > Same question for several other linker scripts below.
>
> Not all SPLs use relocation -- actually, most SPLs do not use
> relocation, and thus do not need image and relocaton section symbols.

Then, why do you keep the old definition of __image_copy_end in such linker
scripts? Probably because start.S can't be linked in otherwise, but this is no
longer true at the end of this series with the new relocate.S that is garbage-
collected for those SPLs. And in all cases, shouldn't all linker scripts
requiring __image_copy_end be converted to the new definition?

[...]

Best regards,
Beno?t