The following line asserts when sh_addralign > MAX_UINT32 && (uint32_t)sh_addralign == 0:
ExpectedOffset = alignTo(ExpectedOffset, SecHdr.sh_addralign ? SecHdr.sh_addralign : 1);
it happens because sh_addralign is truncated to 32-bit value, but alignTo
doesn't accept Align == 0. We should change 1 to 1uLL.