[lld] [LLD] Implement --enable-non-contiguous-regions (PR #90007)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 10:28:24 PDT 2024


================
@@ -555,6 +583,28 @@ LinkerScript::computeInputSections(const InputSectionDescription *cmd,
   // Matched sections after the last SORT* are sorted by (--sort-alignment,
   // input order).
   sortByPositionThenCommandLine(sizeAfterPrevSort, ret.size());
+
+  // Replace matches after the first with potential spill sections.
----------------
smithp35 wrote:

Could be worth expanding on this a bit to remind us that this is for enable-non-contiguous regions.

Perhaps something like:
```
When --enable-contiguous-regions is on sections may match an InputSectionDescription in more than one OutputSection. The
first match against is recorded as an InputSection, subsequent matches are recorded as potential spill sections.
```

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


More information about the llvm-commits mailing list