]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Add relocation types generated by clang
authorMichael Brown <mcb30@ipxe.org>
Tue, 19 Dec 2023 16:29:42 +0000 (16:29 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 19 Dec 2023 16:29:42 +0000 (16:29 +0000)
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>
src/util/elf2efi.c

index acde75c08902b497389ab51a4ef7a681aa4e1bdb..3bf6cbf9e2920131a92b267f45893ac948601940 100644 (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 ):