[MC][ELF] Support for zero flag section groups
authorPetr Hosek <phosek@google.com>
Mon, 1 Feb 2021 06:42:35 +0000 (22:42 -0800)
committerPetr Hosek <phosek@google.com>
Tue, 16 Feb 2021 22:23:40 +0000 (14:23 -0800)
commit16af97393346ad636298605930a8b503a55eb40a
tree335d13493c66fe7bf73914ec5707e29024fd3a8e
parent76609f17ced61f031a1fc77b2e0ed4aa9833917b
[MC][ELF] Support for zero flag section groups

This change introduces support for zero flag ELF section groups to LLVM.
LLVM already supports COMDAT sections, which in ELF are a special type
of ELF section groups. These are generally useful to enable linker GC
where you want a group of sections to always travel together, that is to
be either retained or discarded as a whole, but without the COMDAT
semantics. Other ELF assemblers already support zero flag ELF section
groups and this change helps us reach feature parity.

Differential Revision: https://reviews.llvm.org/D95851
17 files changed:
llvm/include/llvm/MC/MCContext.h
llvm/include/llvm/MC/MCSectionELF.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/MC/ELFObjectWriter.cpp
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCELFStreamer.cpp
llvm/lib/MC/MCObjectFileInfo.cpp
llvm/lib/MC/MCParser/ELFAsmParser.cpp
llvm/lib/MC/MCSectionELF.cpp
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/lib/Target/ARM/ARMTargetObjectFile.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
llvm/test/CodeGen/X86/elf-group.ll [new file with mode: 0644]