audk/ArmVirtPkg/PrePi
Ard Biesheuvel 04d9d89b7d ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: revert to PIE linking
In some cases, the CLANG38 toolchain profile in LTO mode emits GOT
based relocations in spite of our attempts to avoid this, by using
hidden visibility, -Bsymbolic etc.

On AARCH64, we managed to work around this by processing the GOT
based relocations in GenFw. As it turns out, the same issue exists
on 32-bit ARM, but unfortunately, we cannot use a similar trick to
get rid of the GOT entry, and the relocation metadata is insufficient
to locate the GOT entry in the binary.

Note that in this particular case, we are interested in PIE linking
only (i.e., producing a .rela section containing dynamic relocations
that the startup code can process directly), and not in position
independent code generation, and by passing the -pie option to the
linker directly using -Wl,-pie (and dropping -shared), we can coerce
the GOLD linker into doing only the former rather than both when it
performs its LTO code generation.

Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-09-05 10:05:08 -07:00
..
AArch64 ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
Arm ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
Scripts ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
ArmVirtPrePiUniCoreRelocatable.inf ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: revert to PIE linking 2019-09-05 10:05:08 -07:00
FdtParser.c ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
PrePi.c ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00
PrePi.h ArmVirtPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:21 -07:00