[lld] [ELF] Add -z sort-thunks to sort thunks by destination (PR #211721)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 25 16:07:27 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);
+}
+
----------------
MaskRay wrote:

Extracted to 40f8720c5db91fdf753133af05ba14ce7c3e44d7

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


More information about the llvm-commits mailing list