mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 17:45:07 +08:00
[ELF] Don't add input sections twice when linker script is used
llvm-svn: 279036
This commit is contained in:
@@ -284,7 +284,8 @@ void LinkerScript<ELFT>::createSections(OutputSectionFactory<ELFT> &Factory) {
|
||||
if (IsNew)
|
||||
OutputSections->push_back(OutSec);
|
||||
for (InputSectionBase<ELFT> *Sec : V)
|
||||
OutSec->addSection(Sec);
|
||||
if (!Sec->OutSec)
|
||||
OutSec->addSection(Sec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user