[llvm] [XCOFF] Support the subtype in Dwarf section headers (PR #81667)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 02:18:17 PST 2024


================
@@ -153,15 +153,21 @@ struct XCOFFAuxiliaryHeader64 : XCOFFAuxiliaryHeader<XCOFFAuxiliaryHeader64> {
 };
 
 template <typename T> struct XCOFFSectionHeader {
-  // Least significant 3 bits are reserved.
+  // The section flags definitions are the same in both 32- and 64-bit objects.
+  //  Least significant 3 bits are reserved.
   static constexpr unsigned SectionFlagsReservedMask = 0x7;
 
   // The low order 16 bits of section flags denotes the section type.
   static constexpr unsigned SectionFlagsTypeMask = 0xffffu;
 
+  // The high order 16 bits of section flags denotes the section subtype.
+  // For now, this is only used for dwarf sections.
+  static constexpr unsigned SectionFlagsSubtypeMask = 0xffff0000u;
----------------
jh7370 wrote:

What do you actually get by having this mask? The `SectionFlagsTypeMask` alone would be enough to mask out the bits that aren't actually needed for the subtype.

https://github.com/llvm/llvm-project/pull/81667


More information about the llvm-commits mailing list