aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 1b30645..a797595 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -933,10 +933,16 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) {
// the ABI or object file format, but various tools rely on the section
// name being empty (considering named symbols to be "user symbol names").
TextSection = Ctx->getXCOFFSection(
- "", SectionKind::getText(),
+ "..text..", // Use a non-null name to work around an AIX assembler bug...
+ SectionKind::getText(),
XCOFF::CsectProperties(XCOFF::StorageMappingClass::XMC_PR, XCOFF::XTY_SD),
/* MultiSymbolsAllowed*/ true);
+ // ... but use a null name when generating the symbol table.
+ MCSectionXCOFF *TS = static_cast<MCSectionXCOFF *>(TextSection);
+ TS->getQualNameSymbol()->setSymbolTableName("");
+ TS->setSymbolTableName("");
+
DataSection = Ctx->getXCOFFSection(
".data", SectionKind::getData(),
XCOFF::CsectProperties(XCOFF::StorageMappingClass::XMC_RW, XCOFF::XTY_SD),