Index: ELF/InputSection.h =================================================================== --- ELF/InputSection.h +++ ELF/InputSection.h @@ -200,13 +200,13 @@ // be found by looking at the next one). struct SectionPiece { SectionPiece(size_t Off, uint32_t Hash, bool Live) - : InputOff(Off), Hash(Hash), OutputOff(-1), - Live(Live || !Config->GcSections) {} + : InputOff(Off), Hash(Hash), Live(Live || !Config->GcSections), + OutputOff(-1) {} uint32_t InputOff; - uint32_t Hash; - int64_t OutputOff : 63; - uint64_t Live : 1; + uint32_t Hash : 31; + uint32_t Live : 1; + int64_t OutputOff; }; static_assert(sizeof(SectionPiece) == 16, "SectionPiece is too big"); Index: ELF/SyntheticSections.h =================================================================== --- ELF/SyntheticSections.h +++ ELF/SyntheticSections.h @@ -710,7 +710,7 @@ // If we use lower bits, it significantly increases the probability of // hash collisons. size_t getShardId(uint32_t Hash) { - return Hash >> (32 - llvm::countTrailingZeros(NumShards)); + return Hash >> (31 - llvm::countTrailingZeros(NumShards)); } // Section size