diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index ad58e75c11f..9c89de3148e 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -183,6 +183,9 @@ DynamicSection<ELFT>::DynamicSection(SymbolTable &SymTab, } template <class ELFT> void DynamicSection<ELFT>::finalize() { + if (this->Header.sh_size) + return; // Already finalized. + typename Base::HeaderT &Header = this->Header; Header.sh_link = DynStrSec.getSectionIndex(); |