aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp b/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
index 0b5109e41e71..a79759557b2e 100644
--- a/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -547,8 +547,13 @@ void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
PPA1Section =
Ctx->getGOFFSection(".ppa1", SectionKind::getMetadata(), TextSection,
MCConstantExpr::create(GOFF::SK_PPA1, *Ctx));
+ PPA2Section =
+ Ctx->getGOFFSection(".ppa2", SectionKind::getMetadata(), TextSection,
+ MCConstantExpr::create(GOFF::SK_PPA2, *Ctx));
ADASection =
Ctx->getGOFFSection(".ada", SectionKind::getData(), nullptr, nullptr);
+ IDRLSection =
+ Ctx->getGOFFSection("B_IDRL", SectionKind::getData(), nullptr, nullptr);
}
void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) {
@@ -928,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),