aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorNeumann Hon <neumann.hon@ibm.com>2024-03-05 15:29:07 -0500
committerGitHub <noreply@github.com>2024-03-05 15:29:07 -0500
commiteccc71783c4a7682e4cc876f62feca74889fb192 (patch)
treea42b39a7e5615956110ae9b47274e7adbe96f8db /llvm/lib/MC/MCObjectFileInfo.cpp
parentb8c6252bc19e05fc968c6504b69f5fed208f32d4 (diff)
downloadllvm-eccc71783c4a7682e4cc876f62feca74889fb192.zip
llvm-eccc71783c4a7682e4cc876f62feca74889fb192.tar.gz
llvm-eccc71783c4a7682e4cc876f62feca74889fb192.tar.bz2
[SystemZ] [z/OS] Emit offset to PPA2 in separate MCSection (#84043)
The ppa2list section isn't really part of the ppa2 section. The ppa2list section contains the offset to the ppa2, and must be created with a special section name (specifically, C_@@QPPA2). The binder searches for a section with this name, then uses this value to locate the ppa2. In GOFF terms, these are entirely separate sections; the PPA2 section isn't even really a section but rather belongs to the code section. On the other hand, the ppa2list section is a section in its own right and resides in a separate TXT record.
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 7b382c1..1f8f8ec 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -554,6 +554,11 @@ void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
PPA2Section =
Ctx->getGOFFSection(".ppa2", SectionKind::getMetadata(), TextSection,
MCConstantExpr::create(GOFF::SK_PPA2, *Ctx));
+
+ PPA2ListSection =
+ Ctx->getGOFFSection(".ppa2list", SectionKind::getData(),
+ nullptr, nullptr);
+
ADASection =
Ctx->getGOFFSection(".ada", SectionKind::getData(), nullptr, nullptr);
IDRLSection =