diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 32fe19b2f8cd..b726582e548d 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -651,10 +651,10 @@ OutputSectionFactory::create(const SectionKey &Key, error("Section has flags incompatible with others with the same name " + toString(C)); - // Convert notbits to progbits if they are mixed. This happens is some - // linker scripts. - if (Sec->Type == SHT_NOBITS && C->Type == SHT_PROGBITS) - Sec->Type = SHT_PROGBITS; + // Convert notbits to progbits if they are mixed. This happens is some + // linker scripts. + if (Sec->Type == SHT_NOBITS && C->Type == SHT_PROGBITS) + Sec->Type = SHT_PROGBITS; if (!IsScripted && Sec->Type != C->Type && !(Sec->Type == SHT_PROGBITS && C->Type == SHT_NOBITS)) error("Section has different type from others with the same name " +