[lld] [lld][ELF] Sort thunks by their destination to allow quicker convergence (PR #209962)

Pranav Kant via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 09:58:01 PDT 2026


================
@@ -629,6 +629,11 @@ void Thunk::setOffset(uint64_t newOffset) {
   offset = newOffset;
 }
 
+uint64_t Thunk::getDestVA() const {
+  return destination.isInPlt(ctx) ? destination.getPltVA(ctx)
+                                  : destination.getVA(ctx, addend);
+}
+
 // AArch64 Thunk base class.
 static uint64_t getAArch64ThunkDestVA(Ctx &ctx, const Symbol &s, int64_t a) {
----------------
pranavk wrote:

I can take care of this in a follow-up PR.

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


More information about the llvm-commits mailing list