diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 68992bd32c3..d8ec21c722a 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -895,7 +895,11 @@ bool elf2::canBePreempted(const SymbolBody *Body, bool NeedsGot) { } if (!Config->Shared) return false; - return Body->getVisibility() == STV_DEFAULT; + if (Body->getVisibility() != STV_DEFAULT) + return false; + if (Config->Bsymbolic || (Config->BsymbolicFunctions && Body->isFunc())) + return false; + return true; } template <class ELFT> void OutputSection<ELFT>::writeTo(uint8_t *Buf) { |