- /// IsExplicit - Indicates that this section comes from globals with an
- /// explicit section specfied.
- bool IsExplicit;
-
- MCSectionELF(const StringRef &Section, unsigned T, unsigned F,
- SectionKind K, bool isExplicit)
- : MCSection(K), SectionName(Section.str()), Type(T), Flags(F),
- IsExplicit(isExplicit) {}
-public:
-
- static MCSectionELF *Create(const StringRef &Section, unsigned Type,
- unsigned Flags, SectionKind K, bool isExplicit,
- MCContext &Ctx);
-
- /// ShouldOmitSectionDirective - Decides whether a '.section' directive
- /// should be printed before the section name
- bool ShouldOmitSectionDirective(const char *Name,
- const TargetAsmInfo &TAI) const;
-
- /// ShouldPrintSectionType - Only prints the section type if supported
- bool ShouldPrintSectionType(unsigned Ty) const;
-
- /// IsCommon - True if this section contains only common symbols
- bool IsCommon() const;
-
- /// These are the section type and flags fields. An ELF section can have
- /// only one Type, but can have more than one of the flags specified.
- ///
- /// Valid section types.
- enum {
- // This value marks the section header as inactive.
- SHT_NULL = 0x00U,
-
- // Holds information defined by the program, with custom format and meaning.
- SHT_PROGBITS = 0x01U,
-
- // This section holds a symbol table.
- SHT_SYMTAB = 0x02U,
-
- // The section holds a string table.
- SHT_STRTAB = 0x03U,
-
- // The section holds relocation entries with explicit addends.
- SHT_RELA = 0x04U,
-
- // The section holds a symbol hash table.
- SHT_HASH = 0x05U,
-
- // Information for dynamic linking.
- SHT_DYNAMIC = 0x06U,
-
- // The section holds information that marks the file in some way.
- SHT_NOTE = 0x07U,
-
- // A section of this type occupies no space in the file.
- SHT_NOBITS = 0x08U,
-
- // The section holds relocation entries without explicit addends.
- SHT_REL = 0x09U,