diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 6f04b31c5723..bde60e230ce8 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1882,15 +1882,15 @@ template void Writer::finalizeSections() { ElfSym::tlsModuleBase = cast(s); } } - } - if (!config->relocatable) { - llvm::TimeTraceScope timeScope("Finalize .eh_frame"); // This responsible for splitting up .eh_frame section into // pieces. The relocation scan uses those pieces, so this has to be // earlier. - for (Partition &part : partitions) - finalizeSynthetic(part.ehFrame.get()); + { + llvm::TimeTraceScope timeScope("Finalize .eh_frame"); + for (Partition &part : partitions) + finalizeSynthetic(part.ehFrame.get()); + } if (config->hasDynSymTab) { parallelForEach(symtab.getSymbols(), [](Symbol *sym) {