audk/BaseTools/Source/C
Ard Biesheuvel 0d68ce514b BaseTools/GenFw ARM: don't permit R_ARM_GOT_PREL relocations
We currently permit R_ARM_GOT_PREL relocations in the ELF32 conversion
routines, under the assumption that relative relocations are fine as
long as the section layout is the same between ELF and PE/COFF.

However, as is the case with any proxy generating relocation, it is
up to the linker to emit an entry in the GOT table and populate it
with the correct absolute address, which should also be fixed up at
PE/COFF load time. Unfortunately, the relocations covering the GOT
section are not emitted into the static relocation sections processed
by GenFw, but only in the dynamic relocation section as a R_ARM_RELATIVE
relocation, and so GenFw fails to emit the correct PE/COFF relocation
data for GOT entries.

Since GOT indirection is pointless anyway for PE/COFF modules running
in UEFI context, let's just drop the references to R_ARM_GOT_PREL from
GenFw, resulting in a build time failure rather than a runtime failure
if such relocations do occur.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-12-12 08:36:59 +01:00
..
BrotliCompress BaseTools: Update Brotli Compress to the latest one 1.0.6 2018-10-09 22:27:32 +08:00
Common BaseTools/CommonLib: drop the use of MAX_ADDRESS 2018-12-06 08:32:00 +01:00
DevicePath BaseTools/DevicePath: use MAX_UINT32 as default device path max size 2018-12-05 09:04:54 +01:00
EfiRom BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenCrc32 BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenFfs BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenFv BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GenFw BaseTools/GenFw ARM: don't permit R_ARM_GOT_PREL relocations 2018-12-12 08:36:59 +01:00
GenSec BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
Include BaseTools/CommonLib: drop the use of MAX_ADDRESS 2018-12-06 08:32:00 +01:00
LzmaCompress BaseTools LzmaCompress: Fix GCC warning misleading-indentation 2018-10-09 11:47:25 +02:00
Makefiles BaseTools: Support multi thread build Basetool on Windows 2018-09-12 13:02:11 +08:00
PyEfiCompressor BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
Split BaseTools GNUmakefile: Remove HOST_ARCH in every tool Makefile 2018-02-06 13:44:42 +08:00
TianoCompress BaseTools: Fix UEFI and Tiano Decompression logic issue 2018-11-11 11:48:31 +08:00
VfrCompile BaseTools/VfrCompile: honor EXTRA_LDFLAGS 2018-08-22 09:32:46 -07:00
VolInfo BaseTools: Clean up source files 2018-07-09 10:25:47 +08:00
GNUmakefile BaseTools: Remove tools only used by DuetPkg 2018-12-06 14:32:04 +08:00
Makefile BaseTools: Remove tools only used by DuetPkg 2018-12-06 14:32:04 +08:00