[llvm] [BOLT][RISCV] Handle static IFUNC calls through .iplt (PR #207733)

Kito Cheng via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 00:06:54 PDT 2026


================
@@ -1353,7 +1353,18 @@ void RewriteInstance::discoverFileObjects() {
   // that is a subject to dynamic relocation processing.
   processDynamicRelocations();
 
-  // Process PLT section.
+  SmallVector<uint64_t, 1> RISCVIFUNCResolvers;
+  if (BC->TheTriple->isRISCV64()) {
+    for (const BinarySection &Section : BC->allocatableSections())
+      for (const Relocation &Rel : Section.dynamicRelocations())
+        if (Rel.isIRelative() && Rel.Addend)
+          RISCVIFUNCResolvers.push_back(Rel.Addend);
+  }
----------------
kito-cheng wrote:

Does it possible to create BinaryFunction for all ifunc resolver here than split it into 3 stage?

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


More information about the llvm-commits mailing list