Currently, an error was reported when a thread local symbol has an invalid name.
D100956 create a new symbol to prefix the TLS symbol name with a dot. When the symbol name is renamed, the error occurs.
This patch uses the original symbol name (name in the symbol table) as the input for the symbol for TOC entry.
Details
Details
- Reviewers
shchenz DiggerLin qiucf lkail hubert.reinterpretcast sfertile - Group Reviewers
Restricted Project - Commits
- rGdfe55cc1cd24: [AIX] use the original name as the input to create the new symbol for TLS…
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@@ -2601,19 +2603,27 @@ void PPCAIXAsmPrinter::emitEndOfAsmFile(Module &M) { SmallString<128> Name; StringRef Prefix = "."; Name += Prefix; - Name += I.first.first->getName(); + Name += cast<MCSymbolXCOFF>(I.first.first)->getSymbolTableName();
Will this make more sense? I saw for normal global variables, we will use the original symbol name(name in the symbol table) as the input for the symbol for TOC entry. See function MCSection *TargetLoweringObjectFileXCOFF::getSectionForTOCEntry().
Comment Actions
Thanks! @shchenz It's much more reasonable than the previous fix. I did not notice that we can get the original name from the symbol table.