diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index c0e6deab7849..7540f22a42ce 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2239,16 +2239,15 @@ void elf::decompressAndMergeSections() { continue; StringRef OutsecName = getOutputSectionName(MS->Name); - uint64_t Flags = MS->Flags & ~(uint64_t)SHF_GROUP; uint32_t Alignment = std::max(MS->Alignment, MS->Entsize); auto I = llvm::find_if(MergeSections, [=](MergeSyntheticSection *Sec) { - return Sec->Name == OutsecName && Sec->Flags == Flags && + return Sec->Name == OutsecName && Sec->Flags == MS->Flags && Sec->Alignment == Alignment; }); if (I == MergeSections.end()) { - MergeSyntheticSection *Syn = - make(OutsecName, MS->Type, Flags, Alignment); + MergeSyntheticSection *Syn = make( + OutsecName, MS->Type, MS->Flags, Alignment); MergeSections.push_back(Syn); I = std::prev(MergeSections.end()); S = Syn;