[PATCH] D97049: [XCOFF][NFC] add DWARF section support in XCOFF object writer

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 07:27:23 PST 2021


shchenz created this revision.
shchenz added reviewers: hubert.reinterpretcast, jsji, daltenty, ZarkoCA, jasonliu, PowerPC.
Herald added a subscriber: hiraditya.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We are going to support DWARF for XCOFF. D95518 <https://reviews.llvm.org/D95518> is for XCOFF DWARF support of assembly output.

This patch is the NFC part of the patches that are going to support XCOFF DWARF support of object output.

Changes in this patch:
1: Create one base struct `XCOFFSection` to represent the wrapper of `MCSectionXCOFF . The legacy `ControlSection` now derives from `XCOFFSection` and the newly created `DWARFSection` also derives from this struct.
2: Create another base struct `SectionEntry` to represent the section entry in the section table. The legacy `Section` now derives from `SectionEntry` and it is renamed to `CsectSectionEntry` and the newly created `DWARFSectionEntry` struct also derives from `SectionEntry` which will be used to represent DWARF sections.

Usage of the new structs `DWARFSection` and `DWARFSectionEntry` will be added later when the NFC patch makes sense to reviewers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97049

Files:
  llvm/include/llvm/MC/MCSectionXCOFF.h
  llvm/lib/MC/XCOFFObjectWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97049.324975.patch
Type: text/x-patch
Size: 18302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210219/fc31c4ae/attachment.bin>


More information about the llvm-commits mailing list