[U-Boot] [PATCH v1] Refactor linker-generated arrays

Marek Vasut
2013-02-02T17:53:53Z

Dear Daniel Schwierzeck,

> Hi Albert,
>
> 2013/2/2 Albert ARIBAUD <albert.u.boot@aribaud.net>:
> > Refactor linker-generated array code so that symbols
> > which were previously linker-generated are now compiler-
> > generated. This causes relocation records of type
> > R_ARM_ABS32 to become R_ARM_RELATIVE, which makes
> > code which uses LGA able to run before relocation as
> > well as after.
> >
> > Note: this affects more than ARM targets, as linker-
> > lists span possibly all target architectures, notably
> > PowerPC.
> >
> > Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > ---
>
> for the MIPS part:
> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
>
>
> BTW: if we use
>
> .u_boot_list : {
> KEEP(*(SORT(.u_boot_list*)))
> }
>
> we can get rid of the undef magic in the final link of u-boot

UUuuuu, that's amazing. We're shifting from one kind of black magic onto another
voodoo. But certainly, this KEEP() is much cleaner, I like it :)

Best regards,
Marek Vasut