[lld] [LLD] Add CLASS syntax to SECTIONS (PR #95323)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 14:38:38 PDT 2024
================
@@ -717,14 +752,66 @@ void LinkerScript::processSectionCommands() {
} else if (process(osec)) {
osec->sectionIndex = i++;
}
+ } else if (auto *sc = dyn_cast<SectionClassDesc>(base)) {
+ for (InputSectionDescription *isd : sc->sc.commands) {
+ isd->sectionBases =
+ computeInputSections(isd, ctx.inputSections, sc->sc);
+ for (InputSectionBase *s : isd->sectionBases) {
+ // Section classes with --enable-non-contiguous-regions may contain
----------------
MaskRay wrote:
This comment is not accurate. This code path is useful even if --enable-non-contiguous-regions is unused.
https://github.com/llvm/llvm-project/pull/95323
More information about the llvm-commits
mailing list