commit | 3f675e38bdf31ed63859dbab6cd1a8ca342c31dc | [log] [tgz] |
---|---|---|
author | Eugene Leviant <evgeny.leviant@gmail.com> | Thu Aug 18 07:27:37 2016 +0000 |
committer | Eugene Leviant <evgeny.leviant@gmail.com> | Thu Aug 18 07:27:37 2016 +0000 |
tree | adf66e4dde1777ecf7ee9a5f4993fcba1ee8c284 | |
parent | 7b6b1bd0383cf32e9275afe6b532f699d6531eaa [diff] [blame] |
[ELF] Don't add input sections twice when linker script is used llvm-svn: 279036
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 922c7da..35a1a61 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp
@@ -284,7 +284,8 @@ if (IsNew) OutputSections->push_back(OutSec); for (InputSectionBase<ELFT> *Sec : V) - OutSec->addSection(Sec); + if (!Sec->OutSec) + OutSec->addSection(Sec); } }