diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-18 20:30:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:12:03 +0000 |
| commit | c9157d925c489f07ba9c0b2ce47e5149b75969a5 (patch) | |
| tree | 08bc4a3d9cad3f9ebffa558ddf140b9d9257b219 /contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp | |
| parent | 2a66844f606a35d68ad8a8061f4bea204274b3bc (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp | 13 |
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), |
