[ELF] Fix TimeTraceScope for "Finalize .eh_frame"

This commit is contained in:
Fangrui Song 2022-12-03 18:00:51 +00:00
parent 7d147a3263
commit d98c172712
1 changed files with 5 additions and 5 deletions

View File

@ -1882,15 +1882,15 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
ElfSym::tlsModuleBase = cast<Defined>(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) {