Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[efi] Ignore new LoongArch PC-relative relocations and relaxations
Several new relocations types have been added in LoongArch ABI version 2.10. In particular: - R_LARCH_B16 (18-bit PC-relative jump) - R_LARCH_B21 (23-bit PC-relative jump) - R_LARCH_PCREL20_S2 (22-bit PC-relative offset) Also relocation relaxations have been introduced. Recent GCC (13.2) and binutils 2.41+ use these types of relocations, which confuses elf2efi tool. As a result, iPXE EFI images for LoongArch fail to build with the following error: Unrecognised relocation type 103 Fix by ignoring R_LARCH_B{16,21} and R_LARCH_PCREL20_S2 (as with other PC-relative relocations), and by ignoring relaxations (R_LARCH_RELAX). Relocation relaxations are basically optimizations: ignoring them results in a correct binary (although it might be suboptimal). This mirrors iPXE commit ee6185d ("[efi] Ignore new LoongArch PC-relative relocations and relaxations"). Modified-by: Michael Brown <[email protected]> Signed-off-by: Michael Brown <[email protected]>
- Loading branch information