[llvm-branch-commits] [lld] ELF: Only rewrite non-preemptible IFUNCs to IPLT functions if a non-IRELATIVE relocation is needed. (PR #133531)

Peter Smith via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 10 09:38:32 PDT 2025


================
@@ -1761,6 +1761,9 @@ void RelocationBaseSection::computeRels() {
     llvm::sort(nonRelative, irelative, [&](auto &a, auto &b) {
       return std::tie(a.r_sym, a.r_offset) < std::tie(b.r_sym, b.r_offset);
     });
+    llvm::sort(irelative, relocs.end(), [&](auto &a, auto &b) {
----------------
smithp35 wrote:

Could be worth updating the comment on line 1753, which doesn't mention irelative after non-irelative. If the r_offset is not just for readability it will be worth updating that too. 

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


More information about the llvm-branch-commits mailing list