diff options
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 5 | ||||
| -rw-r--r-- | lld/ELF/OutputSections.h | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 4f198d85493..aff063b499e 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -1098,9 +1098,8 @@ static void writeCieFde(uint8_t *Buf, ArrayRef<uint8_t> D) { } template <class ELFT> void EhOutputSection<ELFT>::finalize() { - if (Finalized) - return; - Finalized = true; + if (this->Header.sh_size) + return; // Already finalized. size_t Off = 0; for (CieRecord *Cie : Cies) { diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index 1dbd7d8366e..776e8f1bdec 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -414,8 +414,6 @@ private: // CIE records are uniquified by their contents and personality functions. llvm::DenseMap<std::pair<ArrayRef<uint8_t>, SymbolBody *>, CieRecord> CieMap; - - bool Finalized = false; }; template <class ELFT> |

