ELF: Report duplicate symbols as many as possible instead of the first one.

http://reviews.llvm.org/D16647

llvm-svn: 259233
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 2b0789b..61727c4 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -335,6 +335,8 @@
 
   for (std::unique_ptr<InputFile> &F : Files)
     Symtab.addFile(std::move(F));
+  if (HasError)
+    return; // There were duplicate symbols or incompatible files
 
   for (StringRef S : Config->Undefined)
     Symtab.addUndefinedOpt(S);