Page MenuHomePhabricator

[XCOFF][NFC] add DWARF section support in XCOFF object writer
ClosedPublic

Authored by shchenz on Feb 19 2021, 7:27 AM.

Details

Summary

We are going to support DWARF for XCOFF. 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.

Diff Detail

Event Timeline

shchenz created this revision.Feb 19 2021, 7:27 AM
shchenz requested review of this revision.Feb 19 2021, 7:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2021, 7:27 AM
shchenz edited the summary of this revision. (Show Details)Feb 19 2021, 7:28 AM
shchenz updated this revision to Diff 325183.Feb 20 2021, 3:41 AM

1: minor update

shchenz updated this revision to Diff 325388.Feb 22 2021, 12:44 AM

1: minor update

jsji added inline comments.Mar 8 2021, 8:34 PM
llvm/include/llvm/MC/MCSectionXCOFF.h
107

Need rebase after D95518?

shchenz added inline comments.Mar 8 2021, 8:38 PM
llvm/include/llvm/MC/MCSectionXCOFF.h
107

yep, working on it. Will post the rebased on soon.

shchenz planned changes to this revision.Mar 8 2021, 8:38 PM

gentle ping

shchenz planned changes to this revision.Mar 9 2021, 6:02 PM
shchenz updated this revision to Diff 329555.Mar 10 2021, 12:14 AM

format fix

shchenz updated this revision to Diff 331466.Mar 17 2021, 10:42 PM

fix lint warnings

shchenz planned changes to this revision.Mar 19 2021, 6:57 PM
shchenz updated this revision to Diff 332947.Mar 24 2021, 5:50 AM

update for dynamic allocating for the section entries.

gentle ping

shchenz updated this revision to Diff 350544.Jun 8 2021, 2:47 AM

1: use different way for csect sections and dwarf sections

gentle ping

gentle ping

jsji accepted this revision as: jsji.Jun 30 2021, 9:15 AM

LGTM.

This revision is now accepted and ready to land.Jun 30 2021, 9:15 AM
This revision was landed with ongoing or failed builds.Jul 4 2021, 8:13 PM
This revision was automatically updated to reflect the committed changes.