diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r-- | lld/ELF/Writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 664d468e2ef..3c509557bec 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1294,8 +1294,9 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() { applySynthetic({In<ELFT>::EhFrame}, [](SyntheticSection *SS) { SS->finalizeContents(); }); - for (Symbol *S : Symtab->getSymbols()) - S->body()->IsPreemptible = computeIsPreemptible(*S->body()); + if (Config->DynamicList.empty()) + for (Symbol *S : Symtab->getSymbols()) + S->body()->IsPreemptible = computeIsPreemptible(*S->body()); // Scan relocations. This must be done after every symbol is declared so that // we can correctly decide if a dynamic relocation is needed. |