Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -400,6 +400,9 @@
                                               /*CanOmitFromDynSym*/ false, this)
         ->body();
   case SHN_COMMON:
+    if (Sym->st_value == 0)
+      fatal(getFilename(this) + ": common symbol '" + Name +
+            "' alignment is 0");
     return elf::Symtab<ELFT>::X->addCommon(Name, Sym->st_size, Sym->st_value,
                                            Binding, Sym->st_other,
                                            Sym->getType(), this)
Index: lld/trunk/test/ELF/invalid/common-symbol-alignment.s
===================================================================
--- lld/trunk/test/ELF/invalid/common-symbol-alignment.s
+++ lld/trunk/test/ELF/invalid/common-symbol-alignment.s
@@ -0,0 +1,6 @@
+# REQUIRES: x86
+
+## common-symbol-alignment.elf contains common symbol with zero alignment.
+# RUN: not ld.lld %S/Inputs/common-symbol-alignment.elf \
+# RUN:   -o %t 2>&1 | FileCheck %s
+# CHECK: common symbol 'bar' alignment is 0