[llvm] [BOLT] Fix order of R_*_IRELATIVE in .rela.plt (PR #106515)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 03:56:51 PDT 2024


================
@@ -899,7 +899,7 @@ bool Relocation::isIRelative(uint64_t Type) {
   case Triple::aarch64:
     return Type == ELF::R_AARCH64_IRELATIVE;
   case Triple::riscv64:
-    llvm_unreachable("not implemented");
+    return Type == ELF::R_RISCV_IRELATIVE;
----------------
linsinan1995 wrote:

> Can we replace the whole function body with `return Type == getIRelative();`?

Some extensions may introduce new variants([R_AARCH64_AUTH_[I]RELATIVE](https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst)), but currently, BOLT has no plans to support them, so I think we can make this chang. Do you have any suggestions?

https://github.com/llvm/llvm-project/pull/106515


More information about the llvm-commits mailing list