diff options
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r-- | lld/ELF/InputFiles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index cc8a8492327..e3266f17634 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -437,9 +437,9 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) { /*CanOmitFromDynSym*/ false, this) ->body(); case SHN_COMMON: - if (Sym->st_value == 0) + if (Sym->st_value == 0 || Sym->st_value >= UINT32_MAX) fatal(getFilename(this) + ": common symbol '" + Name + - "' alignment is 0"); + "' has invalid alignment: " + Twine(Sym->st_value)); return elf::Symtab<ELFT>::X->addCommon(Name, Sym->st_size, Sym->st_value, Binding, Sym->st_other, Sym->getType(), this) |