summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2023-12-19 17:29:42 +0100
committerMichael Brown2023-12-19 17:29:42 +0100
commit0958e01463f7ad6a532939e77712ed31b4a12dbc (patch)
tree0b9f6e34bb1ec270541adeaf939c817708d72233
parent[build] Use SOURCE_DATE_EPOCH for FAT serial number if it exists (diff)
downloadipxe-0958e01463f7ad6a532939e77712ed31b4a12dbc.tar.gz
ipxe-0958e01463f7ad6a532939e77712ed31b4a12dbc.tar.xz
ipxe-0958e01463f7ad6a532939e77712ed31b4a12dbc.zip
[efi] Add relocation types generated by clang
Add additional PC-relative relocation types that may be encountered when converting binaries compiled with clang. This mirrors the relevant elf2efi portions of wimboot commit 7910830 ("[build] Support building with the clang compiler"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/util/elf2efi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index acde75c0..3bf6cbf9 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -828,6 +828,8 @@ static void process_reloc ( struct elf_file *elf, const Elf_Shdr *shdr,
case ELF_MREL ( EM_ARM, R_ARM_V4BX ):
case ELF_MREL ( EM_X86_64, R_X86_64_PC32 ) :
case ELF_MREL ( EM_X86_64, R_X86_64_PLT32 ) :
+ case ELF_MREL ( EM_X86_64, R_X86_64_GOTPCRELX ) :
+ case ELF_MREL ( EM_X86_64, R_X86_64_REX_GOTPCRELX ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_CALL26 ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_JUMP26 ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_ADR_PREL_LO21 ) :
@@ -837,6 +839,7 @@ static void process_reloc ( struct elf_file *elf, const Elf_Shdr *shdr,
case ELF_MREL ( EM_AARCH64, R_AARCH64_LDST16_ABS_LO12_NC ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_LDST32_ABS_LO12_NC ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_LDST64_ABS_LO12_NC ) :
+ case ELF_MREL ( EM_AARCH64, R_AARCH64_LDST128_ABS_LO12_NC ) :
case ELF_MREL ( EM_LOONGARCH, R_LARCH_B26):
case ELF_MREL ( EM_LOONGARCH, R_LARCH_PCALA_HI20 ):
case ELF_MREL ( EM_LOONGARCH, R_LARCH_PCALA_LO12 ):