[ELF] Parallelize computeIsPreemptible

This commit is contained in:
Fangrui Song 2022-01-26 23:45:03 -08:00
parent fa5c5230d9
commit 3bc152769d
1 changed files with 4 additions and 2 deletions

View File

@ -1890,9 +1890,11 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
finalizeSynthetic(part.ehFrame.get());
}
if (config->hasDynSymTab)
for (Symbol *sym : symtab->symbols())
if (config->hasDynSymTab) {
parallelForEach(symtab->symbols(), [](Symbol *sym) {
sym->isPreemptible = computeIsPreemptible(*sym);
});
}
// Change values of linker-script-defined symbols from placeholders (assigned
// by declareSymbols) to actual definitions.