[PATCH 1/5] arm64: PIE: Skip fixups if distance is zero
Ard Biesheuvel
ardb at kernel.org
Thu Sep 24 16:49:44 CEST 2020
On Thu, 24 Sep 2020 at 16:45, André Przywara <andre.przywara at arm.com> wrote:
>
> On 24/09/2020 01:17, Andre Przywara wrote:
> > When the actual offset between link and runtime address is zero, there
> > is no need for patching up U-Boot early when running with
> > CONFIG_POSITION_INDEPENDENT.
>
> That turns out to be not fully true.
> Some toolchains (all Linaro cross compilers?) don't handle this well,
> they keep the original locations in the binary uninitialised, and rely
> on the reldyn fixup table to patch in the actual values.
> Other compilers (GCC 9.2 vanilla, Ubuntu GCC 7.5.0, Arm website 9.2)
> fill in the addresses both into the binary and the fixup, so this patch
> works.
>
This was changed in binutils-2.27, to align with other architectures.
A new command line option for ld '--no-apply-dynamic-relocs' was also
added at the same time, to revert to the old behavior.
More information about the U-Boot
mailing list