30 // Parent of this section. Implies that the parent is emitted first.
31 MCSectionGOFF *Parent;
33 // The attributes of the GOFF symbols.
40 // The type of this section.
43 // This section is a BSS section.
46 // Indicates that the PR symbol needs to set the length of the section to a
47 // non-zero value. This is only a problem with the ADA PR - the binder will
48 // generate an error in this case.
49 unsigned RequiresNonZeroLength : 1;
51 // Set to true if the section definition was already emitted.
52 mutable unsigned Emitted : 1;
62 IsBSS(K.
isBSS()), RequiresNonZeroLength(0), Emitted(0) {}
66 :
MCSection(Name, K.isText(), IsVirtual, nullptr), Parent(Parent),
67 EDAttributes(EDAttributes),
SymbolType(
GOFF::ESD_ST_ElementDefinition),
68 IsBSS(K.isBSS()), RequiresNonZeroLength(0), Emitted(0) {}
70 MCSectionGOFF(StringRef Name, SectionKind K,
bool IsVirtual,
71 GOFF::PRAttr PRAttributes, MCSectionGOFF *Parent)
72 : MCSection(Name, K.isText(), IsVirtual, nullptr), Parent(Parent),
73 PRAttributes(PRAttributes), SymbolType(GOFF::ESD_ST_PartReference),
74 IsBSS(K.isBSS()), RequiresNonZeroLength(0), Emitted(0) {}
77 // Return the parent section.
80 // Returns true if this is a BSS section.
81 bool isBSS()
const {
return IsBSS; }
83 // Returns the type of this section.
90 // Accessors to the attributes.
104 // Returns the text style for a section. Only defined for ED and PR sections.
110 return getParent()->getEDAttributes().TextStyle;
111 // Virtual sections have no data, so byte orientation is fine.