Lines Matching defs:SectionName
154 bool parseSectionName(StringRef &SectionName);
244 bool ELFAsmParser::parseSectionName(StringRef &SectionName) {
251 SectionName = getTok().getIdentifier();
274 SectionName = StringRef(FirstLoc.getPointer(), Size);
517 static bool hasPrefix(StringRef SectionName, StringRef Prefix) {
518 return SectionName.consume_front(Prefix) &&
519 (SectionName.empty() || SectionName[0] == '.');
522 static bool allowSectionTypeMismatch(const Triple &TT, StringRef SectionName,
528 return SectionName == ".eh_frame" && Type == ELF::SHT_PROGBITS;
534 return SectionName.starts_with(".debug_") && Type == ELF::SHT_PROGBITS;
540 StringRef SectionName;
542 if (parseSectionName(SectionName))
557 if (hasPrefix(SectionName, ".rodata") || SectionName == ".rodata1")
559 else if (SectionName == ".fini" || SectionName == ".init" ||
560 hasPrefix(SectionName, ".text"))
562 else if (hasPrefix(SectionName, ".data") || SectionName == ".data1" ||
563 hasPrefix(SectionName, ".bss") ||
564 hasPrefix(SectionName, ".init_array") ||
565 hasPrefix(SectionName, ".fini_array") ||
566 hasPrefix(SectionName, ".preinit_array"))
568 else if (hasPrefix(SectionName, ".tdata") || hasPrefix(SectionName, ".tbss"))
637 if (SectionName.starts_with(".note"))
639 else if (hasPrefix(SectionName, ".init_array"))
641 else if (hasPrefix(SectionName, ".bss"))
643 else if (hasPrefix(SectionName, ".tbss"))
645 else if (hasPrefix(SectionName, ".fini_array"))
647 else if (hasPrefix(SectionName, ".preinit_array"))
697 getContext().getELFSection(SectionName, Type, Flags, Size, GroupName,
704 !allowSectionTypeMismatch(getContext().getTargetTriple(), SectionName,
706 Error(loc, "changed section type for " + SectionName + ", expected: 0x" +
709 Error(loc, "changed section flags for " + SectionName + ", expected: 0x" +
713 Error(loc, "changed section entsize for " + SectionName +