diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 5ab66637e023..aa24f1a099a8 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -728,8 +728,8 @@ void Writer::scanRelocs(InputSectionBase &C, ArrayRef Rels) { Out::Plt->addEntry(Body); uint32_t Rel; - if (Body.isGnuIFunc()) - Rel = Preemptible ? Target->PltRel : Target->IRelativeRel; + if (Body.isGnuIFunc() && !Preemptible) + Rel = Target->IRelativeRel; else Rel = Target->PltRel;