[llvm] [BOLT][RISCV] Don't read .rela.plt twice when DT_RELA aliases DT_JMPREL (PR #211201)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 03:11:37 PDT 2026
================
@@ -2731,6 +2731,14 @@ void RewriteInstance::processDynamicRelocations() {
}
}
+ // On RISC-V, DT_RELA aliases DT_JMPREL when .rela.dyn is empty. Skip it to
+ // avoid reading .rela.plt twice.
+ if (DynamicRelocationsAddress && PLTRelocationsAddress &&
+ *DynamicRelocationsAddress == *PLTRelocationsAddress) {
----------------
WangJee wrote:
I've reworded the comment.
https://github.com/llvm/llvm-project/pull/211201
More information about the llvm-commits
mailing list