https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97827
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> --- Now filled https://bugs.llvm.org/show_bug.cgi?id=48201 for this LLVM and GNU as ("gas") tried to align, cf. discussion https://sourceware.org/legacy-ml/binutils/2020-02/msg00091.html and the GAS patch to turn a warning to an error: https://sourceware.org/legacy-ml/binutils/2020-02/msg00129.html However, while llvm/lib/MC/MCParser/ELFAsmParser.cpp always issues an error: + if (Section->getType() != Type) + Error(loc, "changed section type for " + SectionName + ", expected: 0x" + + utohexstr(Section->getType())); etc. The GNU assembler only does so if flags have been specified, gas/config/obj-elf.c: if (attr != 0) { /* If section attributes are specified the second time we see a particular section, then check that they are the same as we saw the first time. */ if (((old_sec->flags ^ flags) ...