diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 36ab5ee69635..f0d978b2beab 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -582,7 +582,7 @@ template void MergeInputSection::splitIntoPieces() { else this->Pieces = splitNonStrings(Data, EntSize); - if (Config->GcSections && this->getSectionHdr()->sh_flags & SHF_ALLOC) + if (Config->GcSections && (this->getSectionHdr()->sh_flags & SHF_ALLOC)) for (uintX_t Off : LiveOffsets) this->getSectionPiece(Off)->Live = true; }