summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Relocations.cpp4
-rw-r--r--lld/test/ELF/x86-64-dyn-rel-error.s3
2 files changed, 2 insertions, 5 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 9a11acf02fd..f1421540900 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -1077,10 +1077,6 @@ static void processRelocAux(InputSectionBase &sec, RelExpr expr, RelType type,
return;
}
- // If the symbol is undefined we already reported any relevant errors.
- if (sym.isUndefined())
- return;
-
errorOrWarn("symbol '" + toString(sym) + "' has no type" +
getLocation(sec, sym, offset));
}
diff --git a/lld/test/ELF/x86-64-dyn-rel-error.s b/lld/test/ELF/x86-64-dyn-rel-error.s
index 7753a4dc4ae..1c715dbfba0 100644
--- a/lld/test/ELF/x86-64-dyn-rel-error.s
+++ b/lld/test/ELF/x86-64-dyn-rel-error.s
@@ -11,6 +11,7 @@ _start:
// CHECK: relocation R_X86_64_32 cannot be used against symbol zed; recompile with -fPIC
-// RUN: ld.lld --noinhibit-exec %t.o %t2.so -o %t 2>&1 | FileCheck --check-prefix=WARN %s
+// RUN: ld.lld --noinhibit-exec %t.o %t2.so -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
+// RUN: not ld.lld --export-dynamic --unresolved-symbols=ignore-all %t.o -o /dev/null 2>&1 | FileCheck --check-prefix=WARN %s
// WARN: symbol 'zed' has no type
OpenPOWER on IntegriCloud