Do not handle DefinedCommon in linker scripts.

Because of r314495, DefinedCommon symbols cannot reach to
getSymbolValue function. When they reach the fucntion, they have
already been converted to DefinedRegular symbols.

llvm-svn: 315432
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 2f48ebe..da76568 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -859,12 +859,10 @@
     error(Loc + ": unable to get location counter value");
     return 0;
   }
-  if (SymbolBody *B = Symtab->find(S)) {
-    if (auto *D = dyn_cast<DefinedRegular>(B))
-      return {D->Section, false, D->Value, Loc};
-    if (auto *C = dyn_cast<DefinedCommon>(B))
-      return {C->Section, false, 0, Loc};
-  }
+
+  if (auto *Sym = dyn_cast_or_null<DefinedRegular>(Symtab->find(S)))
+    return {Sym->Section, false, Sym->Value, Loc};
+
   error(Loc + ": symbol not found: " + S);
   return 0;
 }