Rewrite CommonInputSection as a synthetic input section.
A CommonInputSection is a section containing all common symbols. That was an input section but was abstracted in a different way than the synthetic input sections because it was written before the synthetic input section was invented. This patch rewrites CommonInputSection as a synthetic input section so that it behaves better with other sections. llvm-svn: 286053
This commit is contained in:
@@ -202,13 +202,9 @@ void LinkerScript<ELFT>::computeInputSections(InputSectionDescription *I) {
|
||||
if (elf::ObjectFile<ELFT> *F = S->getFile())
|
||||
Filename = sys::path::filename(F->getName());
|
||||
|
||||
if (!I->FilePat.match(Filename) || Pat.ExcludedFilePat.match(Filename))
|
||||
continue;
|
||||
|
||||
if (Pat.SectionPat.match(S->Name))
|
||||
if (I->FilePat.match(Filename) && !Pat.ExcludedFilePat.match(Filename) &&
|
||||
Pat.SectionPat.match(S->Name))
|
||||
I->Sections.push_back(S);
|
||||
if (Pat.SectionPat.match("COMMON"))
|
||||
I->Sections.push_back(InputSection<ELFT>::CommonInputSection);
|
||||
}
|
||||
|
||||
// Sort sections as instructed by SORT-family commands and --sort-section
|
||||
|
||||
Reference in New Issue
Block a user