[PATCH] D79220: [XCOFF] XCOFF constants, MCObjectFileInfo placeholder code for DWARF; NFC
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 13:59:14 PDT 2020
This revision was automatically updated to reflect the committed changes.
hubert.reinterpretcast marked an inline comment as done.
Closed by commit rGab59aa6c6130: [XCOFF] XCOFF constants, MCObjectFileInfo placeholder code for DWARF; NFC (authored by hubert.reinterpretcast).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79220/new/
https://reviews.llvm.org/D79220
Files:
llvm/include/llvm/BinaryFormat/XCOFF.h
llvm/lib/MC/MCObjectFileInfo.cpp
Index: llvm/lib/MC/MCObjectFileInfo.cpp
===================================================================
--- llvm/lib/MC/MCObjectFileInfo.cpp
+++ llvm/lib/MC/MCObjectFileInfo.cpp
@@ -833,6 +833,22 @@
// The TOC-base always has 0 size, but 4 byte alignment.
TOCBaseSection->setAlignment(Align(4));
+
+ // DWARF sections for XCOFF are not csects. They are special STYP_DWARF
+ // sections, and the individual DWARF sections are distinguished by their
+ // section subtype.
+ // TODO: Populate the DWARF sections appropriately.
+ DwarfAbbrevSection = nullptr; // SSUBTYP_DWABREV
+ DwarfInfoSection = nullptr; // SSUBTYP_DWINFO
+ DwarfLineSection = nullptr; // SSUBTYP_DWLINE
+ DwarfFrameSection = nullptr; // SSUBTYP_DWFRAME
+ DwarfPubNamesSection = nullptr; // SSUBTYP_DWPBNMS
+ DwarfPubTypesSection = nullptr; // SSUBTYP_DWPBTYP
+ DwarfStrSection = nullptr; // SSUBTYP_DWSTR
+ DwarfLocSection = nullptr; // SSUBTYP_DWLOC
+ DwarfARangesSection = nullptr; // SSUBTYP_DWARNGE
+ DwarfRangesSection = nullptr; // SSUBTYP_DWRNGES
+ DwarfMacinfoSection = nullptr; // SSUBTYP_DWMAC
}
void MCObjectFileInfo::InitMCObjectFileInfo(const Triple &TheTriple, bool PIC,
Index: llvm/include/llvm/BinaryFormat/XCOFF.h
===================================================================
--- llvm/include/llvm/BinaryFormat/XCOFF.h
+++ llvm/include/llvm/BinaryFormat/XCOFF.h
@@ -79,6 +79,24 @@
STYP_OVRFLO = 0x8000
};
+/// Values for defining the section subtype of sections of type STYP_DWARF as
+/// they would appear in the (signed, 32-bit) s_flags field of the section
+/// header structure, contributing to the 16 most significant bits. Defined in
+/// the system header `scnhdr.h`.
+enum DwarfSectionSubtypeFlags : int32_t {
+ SSUBTYP_DWINFO = 0x1'0000, ///< DWARF info section
+ SSUBTYP_DWLINE = 0x2'0000, ///< DWARF line section
+ SSUBTYP_DWPBNMS = 0x3'0000, ///< DWARF pubnames section
+ SSUBTYP_DWPBTYP = 0x4'0000, ///< DWARF pubtypes section
+ SSUBTYP_DWARNGE = 0x5'0000, ///< DWARF aranges section
+ SSUBTYP_DWABREV = 0x6'0000, ///< DWARF abbrev section
+ SSUBTYP_DWSTR = 0x7'0000, ///< DWARF str section
+ SSUBTYP_DWRNGES = 0x8'0000, ///< DWARF ranges section
+ SSUBTYP_DWLOC = 0x9'0000, ///< DWARF loc section
+ SSUBTYP_DWFRAME = 0xA'0000, ///< DWARF frame section
+ SSUBTYP_DWMAC = 0xB'0000 ///< DWARF macinfo section
+};
+
// STORAGE CLASSES, n_sclass field of syment.
// The values come from `storclass.h` and `dbxstclass.h`.
enum StorageClass : uint8_t {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79220.262950.patch
Type: text/x-patch
Size: 2538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200508/cf2419ae/attachment.bin>
More information about the llvm-commits
mailing list