[llvm-branch-commits] [lld] [lld][macho] Fix thunks with multiple text sections (PR #197049)
Vy Nguyen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon May 11 19:03:44 PDT 2026
================
@@ -191,17 +194,55 @@ void TextOutputSection::createThunk(const ConcatInputSection &isec,
thunks.push_back(thunkInfo.isec);
}
+std::optional<uint64_t>
+TextOutputSection::estimateStubsEndVA(unsigned numPotentialThunks) const {
+ if (!parent)
+ return std::nullopt;
+
+ auto sections =
+ ArrayRef(parent->getSections())
+ .drop_until([&](const OutputSection *osec) { return osec == this; });
----------------
oontvoo wrote:
Is it ever possible to have `stubs` or `objcStubs` placed *before* the text section?
(In which case you would've skipped over them?)
https://github.com/llvm/llvm-project/pull/197049
More information about the llvm-branch-commits
mailing list