summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 7375b74565a..078382c0c4b 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -157,6 +157,9 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
if (Symtab.getObjectFiles().empty())
error("no input files.");
+ for (auto *Arg : Args.filtered(OPT_undefined))
+ Symtab.addUndefinedSym(Arg->getValue());
+
// Write the result.
const ELFFileBase *FirstObj = Symtab.getFirstELF();
switch (FirstObj->getELFKind()) {
OpenPOWER on IntegriCloud