summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 323a791c3de..28036d3dbeb 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -275,17 +275,17 @@ template <bool Is64Bits> struct DenseMapInfo<SectionKey<Is64Bits>> {
template <class ELFT>
static void reportUndefined(SymbolTable<ELFT> &Symtab, SymbolBody *Sym) {
- if (!Config->NoUndefined) {
- if (Config->Relocatable)
- return;
- if (Config->Shared && Sym->symbol()->Visibility == STV_DEFAULT)
- return;
- }
+ if (Config->UnresolvedSymbols == UnresolvedPolicy::Ignore)
+ return;
+
+ if (Config->Shared && Sym->symbol()->Visibility == STV_DEFAULT &&
+ Config->UnresolvedSymbols != UnresolvedPolicy::NoUndef)
+ return;
std::string Msg = "undefined symbol: " + Sym->getName().str();
if (InputFile *File = Sym->getSourceFile<ELFT>())
Msg += " in " + getFilename(File);
- if (Config->NoinhibitExec)
+ if (Config->UnresolvedSymbols == UnresolvedPolicy::Warn)
warning(Msg);
else
error(Msg);
OpenPOWER on IntegriCloud