Index: src/IceELFObjectWriter.cpp |
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp |
index c3ba9b070ab24fd6397e7d3842afbe3bd3300b4c..536af298935eb352849b64ac7d03c8971e2ff0ce 100644 |
--- a/src/IceELFObjectWriter.cpp |
+++ b/src/IceELFObjectWriter.cpp |
@@ -582,12 +582,8 @@ void ELFObjectWriter::writeJumpTable(const JumpTableData &JT, |
const Elf64_Xword PointerSize = typeWidthInBytes(getPointerType()); |
const Elf64_Xword ShAddralign = PointerSize; |
const Elf64_Xword ShEntsize = PointerSize; |
- const GlobalString JTName = JT.getFunctionName(); |
const std::string SectionName = MangleSectionName( |
- IsPIC ? ".data.rel.ro" : ".rodata", |
- (JTName.hasStdString() ? JTName.toString() |
- : std::to_string(JTName.getID())) + |
- "$jumptable"); |
+ IsPIC ? ".data.rel.ro" : ".rodata", JT.getSectionName()); |
Section = createSection<ELFDataSection>(SectionName, SHT_PROGBITS, SHF_ALLOC, |
ShAddralign, ShEntsize); |
Section->setFileOffset(alignFileOffset(ShAddralign)); |
@@ -599,8 +595,7 @@ void ELFObjectWriter::writeJumpTable(const JumpTableData &JT, |
Section->padToAlignment(Str, PointerSize); |
const bool IsExternal = Ctx.getFlags().getDisableInternal(); |
const uint8_t SymbolBinding = IsExternal ? STB_GLOBAL : STB_LOCAL; |
- GlobalString JumpTableName = Ctx.getGlobalString( |
- InstJumpTable::makeName(JT.getFunctionName(), JT.getId())); |
+ const auto JumpTableName = JT.getName(); |
SymTab->createDefinedSym(JumpTableName, SymbolType, SymbolBinding, Section, |
Section->getCurrentSize(), PointerSize); |
StrTab->add(JumpTableName); |