diff options
author | Michael Brown <mcb30@ipxe.org> | 2023-12-19 16:29:42 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2023-12-19 16:29:42 +0000 |
commit | 0958e01463f7ad6a532939e77712ed31b4a12dbc (patch) | |
tree | 0b9f6e34bb1ec270541adeaf939c817708d72233 | |
parent | 337880deaa7ea5d86e5c7de63faa1c976d6114cf (diff) | |
download | ipxe-0958e01463f7ad6a532939e77712ed31b4a12dbc.tar.gz |
[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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index acde75c08..3bf6cbf9e 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 ): |