]> git.baikalelectronics.ru Git - uboot.git/commit
arm64: PIE: Do not skip static relocation
authorAndre Przywara <andre.przywara@arm.com>
Wed, 30 Sep 2020 16:39:13 +0000 (17:39 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 8 Oct 2020 15:42:36 +0000 (11:42 -0400)
commita9aa1ad213bee159246f4daf66e88401659e0a13
tree3f86eb06c9c42a7c977a34a76bda6f1ac2b97392
parent6118e2c1cdf53b21dd6749000bee44d19b11e2fa
arm64: PIE: Do not skip static relocation

When we build an arm64 target and enable POSITION_INDEPENDENT, we were
skipping our build-time dynamic relocation fixup routine (STATIC_RELA).

This was probably done because we didn't need it in this case, as the
PIE fixup routine in start.S would take care of that at runtime.

However when we now skip this routine (upon detecting that the fixup
offset is 0), this might lead to uninitialised pointers.

Remove the exception, so that we always do the build-time relocation.

NOTE: GNU binutils starting with v2.27.1 do this build-time relocation
automatically, to be in-line with other architecures. So on newer
toolchains our manual fixup is actually not needed. It doesn't hurt to
have it, though, so that we keep compatibility with the popular Linaro
toolchains, which lack this feature.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
arch/arm/Kconfig