Index: ELF/InputFiles.cpp =================================================================== --- ELF/InputFiles.cpp +++ ELF/InputFiles.cpp @@ -899,7 +899,7 @@ if (Sym.st_value) Ret = 1ULL << countTrailingZeros((uint64_t)Sym.st_value); if (0 < Sym.st_shndx && Sym.st_shndx < Sections.size()) - Ret = std::min(Ret, Sections[Sym.st_shndx].sh_addralign); + Ret = std::max(Ret, Sections[Sym.st_shndx].sh_addralign); if (Ret > UINT32_MAX) error(toString(this) + ": alignment too large: " +