diff options
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r-- | lld/ELF/InputFiles.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 9d229564ade..0981e2cd48f 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -400,6 +400,9 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) { /*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) |