[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>
pull/1106/head
Michael Brown 2023-12-19 16:29:42 +00:00
parent 337880deaa
commit 0958e01463
1 changed files with 3 additions and 0 deletions

View File

@ -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 ):