diff options
Diffstat (limited to 'contrib/llvm-project/lld/ELF/ICF.cpp')
-rw-r--r-- | contrib/llvm-project/lld/ELF/ICF.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm-project/lld/ELF/ICF.cpp b/contrib/llvm-project/lld/ELF/ICF.cpp index ec63d2ef4d6f..3b991e8d3470 100644 --- a/contrib/llvm-project/lld/ELF/ICF.cpp +++ b/contrib/llvm-project/lld/ELF/ICF.cpp @@ -461,8 +461,9 @@ template <class ELFT> void ICF<ELFT>::run() { // Compute isPreemptible early. We may add more symbols later, so this loop // cannot be merged with the later computeIsPreemptible() pass which is used // by scanRelocations(). - for (Symbol *sym : symtab->symbols()) - sym->isPreemptible = computeIsPreemptible(*sym); + if (config->hasDynSymTab) + for (Symbol *sym : symtab->symbols()) + sym->isPreemptible = computeIsPreemptible(*sym); // Two text sections may have identical content and relocations but different // LSDA, e.g. the two functions may have catch blocks of different types. If a |