We have following code in lld, that truncates the alignment value to 32 bit. Big alignment in this case
may give result 0 and crash later.
template <class ELFT> CommonInputSection<ELFT>::CommonInputSection(std::vector<DefinedCommon *> Syms) : InputSection<ELFT>(nullptr, &Hdr, "") { .... for (DefinedCommon *Sym : Syms) { this->Alignment = std::max<uintX_t>(this->Alignment, Sym->Alignment); ... } }
Patch fixes the issue. I did not find the way to generate object using yaml2obj for that case.
is probably more helpful.