[llvm] [BOLT][RISCV] Handle static IFUNC calls through .iplt (PR #207733)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 22:05:22 PDT 2026
================
@@ -1992,8 +2044,9 @@ void RewriteInstance::disassemblePLTSectionRISCV(BinarySection &Section) {
}
};
- // Skip the first special entry since no relocation points to it.
- uint64_t InstrOffset = 32;
+ // A regular RISC-V .plt starts with a 32-byte PLT0 header, while a
+ // standalone .iplt contains only 16-byte non-preemptible IFUNC entries.
+ uint64_t InstrOffset = Section.getName() == ".iplt" ? 0 : 32;
----------------
WangJee wrote:
GNU ld can emit static IFUNC entries in a headerless .plt with R_RISCV_IRELATIVE relocations in .rela.plt. The current code always skips 32 bytes for .plt, and the static relocation fallback only discovers .rela.dyn?
https://github.com/llvm/llvm-project/pull/207733
More information about the llvm-commits
mailing list