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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 21:54:56 PDT 2026


================
@@ -1235,7 +1225,7 @@ class ThunkSection final : public SyntheticSection {
   size_t getSize() const override;
   void writeTo(uint8_t *buf) override;
   InputSection *getTargetInputSection() const;
-  bool assignOffsets();
+  bool assignOffsets(bool sort = false);
----------------
MaskRay wrote:

MIPS LA25 thunks are also placed in `isd->thunkSections`... To make LA25/AArch64 BTI landing thunks and future prefix thunks reliable, I've created 
https://github.com/llvm/llvm-project/pull/211721 which adds `isPrefix`.

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


More information about the llvm-commits mailing list