20 MCSectionELF::~MCSectionELF() {}
28 if (Name ==
".text" || Name ==
".data" ||
37 "abcdefghijklmnopqrstuvwxyz"
38 "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == Name.
npos) {
43 for (
const char *B = Name.
begin(), *E = Name.
end(); B < E; ++B) {
60 const MCExpr *Subsection)
const {
65 OS <<
'\t' << *Subsection;
75 !(
Flags & ELF::SHF_MERGE)) {
76 if (
Flags & ELF::SHF_ALLOC)
78 if (
Flags & ELF::SHF_EXECINSTR)
80 if (
Flags & ELF::SHF_WRITE)
82 if (
Flags & ELF::SHF_EXCLUDE)
84 if (
Flags & ELF::SHF_TLS)
91 if (
Flags & ELF::SHF_ALLOC)
93 if (
Flags & ELF::SHF_EXCLUDE)
95 if (
Flags & ELF::SHF_EXECINSTR)
97 if (
Flags & ELF::SHF_GROUP)
99 if (
Flags & ELF::SHF_WRITE)
101 if (
Flags & ELF::SHF_MERGE)
103 if (
Flags & ELF::SHF_STRINGS)
105 if (
Flags & ELF::SHF_TLS)
109 if (
Flags & ELF::XCORE_SHF_CP_SECTION)
111 if (
Flags & ELF::XCORE_SHF_DP_SECTION)
124 if (
Type == ELF::SHT_INIT_ARRAY)
126 else if (
Type == ELF::SHT_FINI_ARRAY)
128 else if (
Type == ELF::SHT_PREINIT_ARRAY)
129 OS <<
"preinit_array";
130 else if (
Type == ELF::SHT_NOBITS)
132 else if (
Type == ELF::SHT_NOTE)
134 else if (
Type == ELF::SHT_PROGBITS)
138 assert(
Flags & ELF::SHF_MERGE);
139 OS <<
"," << EntrySize;
142 if (
Flags & ELF::SHF_GROUP) {
150 OS <<
"\t.subsection\t" << *Subsection <<
'\n';
154 return getFlags() & ELF::SHF_EXECINSTR;
158 return getType() == ELF::SHT_NOBITS;
StringRef getSectionName() const
virtual bool UseCodeAlign() const
static void printName(raw_ostream &OS, StringRef Name)
bool isMergeable2ByteCString() const
unsigned getFlags() const
virtual bool isVirtualSection() const
bool isMergeable4ByteCString() const
bool isMergeableConst16() const
bool isMergeable1ByteCString() const
bool usesSunStyleELFSectionSwitchSyntax() const
size_t find_first_not_of(char C, size_t From=0) const
void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS, const MCExpr *Subsection) const
bool usesELFSectionDirectiveForBSS() const
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const
bool isMergeableConst8() const
StringRef getName() const
getName - Get the symbol name.
bool isMergeableConst4() const
const char * getCommentString() const
static unsigned DetermineEntrySize(SectionKind Kind)