Index: lld/trunk/COFF/Chunks.cpp =================================================================== --- lld/trunk/COFF/Chunks.cpp +++ lld/trunk/COFF/Chunks.cpp @@ -249,7 +249,7 @@ CommonChunk::CommonChunk(const COFFSymbolRef S) : Sym(S) { // Common symbols are aligned on natural boundaries up to 32 bytes. // This is what MSVC link.exe does. - Align = std::min(uint64_t(32), NextPowerOf2(Sym.getValue())); + Align = std::min(uint64_t(32), PowerOf2Ceil(Sym.getValue())); } uint32_t CommonChunk::getPermissions() const { Index: lld/trunk/test/COFF/common.test =================================================================== --- lld/trunk/test/COFF/common.test +++ lld/trunk/test/COFF/common.test @@ -7,7 +7,7 @@ # CHECK: 3005: b8 04 10 00 40 # CHECK: 300a: b8 20 10 00 40 # CHECK: 300f: b8 60 10 00 40 -# CHECK: 3014: b8 80 10 00 40 +# CHECK: 3014: b8 70 10 00 40 --- !COFF header: