[PATCH] D95851: Support for ELF section groups

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 23:47:50 PST 2021


phosek created this revision.
phosek added reviewers: mcgrathr, jhenderson, MaskRay.
Herald added subscribers: dexonsmith, pengfei, steven_wu, hiraditya, arichardson, emaste.
phosek requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

LLVM and lld currently only support COMDAT groups for ELF, which is a
special type of ELF section groups. These are generally useful to enable
linker garbage collection 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. ELF section groups are supported by
other ELF linkers and assemblers such as binutils. This change expands
the LLVM and lld support for ELF section groups to support the
non-COMDAT case.


https://reviews.llvm.org/D95851

Files:
  lld/ELF/InputFiles.cpp
  lld/test/ELF/gc-sections-group-debug.s
  lld/test/ELF/gc-sections-group.s
  llvm/include/llvm/IR/GlobalObject.h
  llvm/include/llvm/MC/MCContext.h
  llvm/include/llvm/MC/MCSectionELF.h
  llvm/lib/AsmParser/LLLexer.cpp
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/AsmParser/LLToken.h
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/Globals.cpp
  llvm/lib/IR/LLVMContextImpl.h
  llvm/lib/IR/Verifier.cpp
  llvm/lib/MC/ELFObjectWriter.cpp
  llvm/lib/MC/MCContext.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/lib/MC/MCParser/ELFAsmParser.cpp
  llvm/lib/MC/MCSectionELF.cpp
  llvm/lib/Target/ARM/ARMTargetObjectFile.cpp
  llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
  llvm/test/Bitcode/compatibility.ll
  llvm/test/CodeGen/X86/group.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95851.320692.patch
Type: text/x-patch
Size: 32173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210202/401826b0/attachment.bin>


More information about the llvm-commits mailing list