const MCSymbolELF *Group,
const MCSectionELF *RelInfoSection);
- void renameELFSection(MCSectionELF *Section, StringRef Name);
-
MCSectionELF *createELFGroupSection(const MCSymbolELF *Group, bool IsComdat);
void recordELFMergeableSectionInfo(StringRef SectionName, unsigned Flags,
return R.first->second;
}
-void MCContext::renameELFSection(MCSectionELF *Section, StringRef Name) {
- StringRef GroupName;
- if (const MCSymbol *Group = Section->getGroup())
- GroupName = Group->getName();
-
- // This function is only used by .debug*, which should not have the
- // SHF_LINK_ORDER flag.
- unsigned UniqueID = Section->getUniqueID();
- ELFUniquingMap.erase(
- ELFSectionKey{Section->getName(), GroupName, "", UniqueID});
- auto I = ELFUniquingMap
- .insert(std::make_pair(
- ELFSectionKey{Name, GroupName, "", UniqueID}, Section))
- .first;
- StringRef CachedName = I->first.SectionName;
- const_cast<MCSectionELF *>(Section)->setSectionName(CachedName);
-}
-
MCSectionELF *MCContext::createELFSectionImpl(StringRef Section, unsigned Type,
unsigned Flags, SectionKind K,
unsigned EntrySize,