]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/C/GenFw/Elf64Convert.c
BaseTools/GenFw AARCH64: add support for relative data relocations
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 12 Feb 2016 09:06:58 +0000 (10:06 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 15 Feb 2016 09:29:38 +0000 (10:29 +0100)
commit0b6249f5902f85a9c1a438878b27f8d7ef960a41
tree2951930d324262af2078e169df15e84da12bb698
parented5e386a6952cb2cf8ca6d723e2abd6c0b4f18c2
BaseTools/GenFw AARCH64: add support for relative data relocations

This adds support to the ELF to PE/COFF conversion performed by GenFw for
the AArch64 ELF relocation types R_AARCH64_PREL64, R_AARCH64_PREL32 and
R_AARCH64_PREL16. Since we already require the ELF and PE/COFF section
layouts to be identical in order to support other relative relocation
types, this is simply a matter of whitelisting these new relocation types
in the same way.

While we're at it, clean up the code a bit, and add a comment explaining
why these relocations are ignored in WriteRelocations64 ().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/GenFw/Elf64Convert.c