[llvm-branch-commits] [lld] [ELF] Emit synthetic local in symbol table for non-preemptible IFUNC (PR #210616)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Jul 19 13:40:07 PDT 2026


================
@@ -1254,9 +1254,8 @@ static bool handleNonPreemptibleIfunc(Ctx &ctx, Symbol &sym, uint16_t flags) {
   if (flags & HAS_DIRECT_RELOC) {
     // Change the value to the IPLT and redirect all references to it.
     auto &d = cast<Defined>(sym);
-    auto *irelativeSym = makeDefined(
-        ctx, d.file, d.getName(), std::as_const(d).binding, d.stOther,
-        std::as_const(d).type, d.value, d.size, d.section);
+    auto *irelativeSym = addSyntheticLocal(ctx, d.getName(), d.type, d.value,
----------------
MaskRay wrote:

Reducing the number of direct makeDefined callers looks good, but this base diff is not in main (no `std::as_const(d)`).

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


More information about the llvm-branch-commits mailing list