summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorXing Xue <xingxue@outlook.com>2019-08-25 15:17:25 +0000
committerXing Xue <xingxue@outlook.com>2019-08-25 15:17:25 +0000
commitef039a3ccdcd39c558c1d1a360b59bbb9bb11af5 (patch)
treef2823223d2dc5604a4852e70219df5402ff2729e /llvm/lib/MC/MCObjectFileInfo.cpp
parent76f005535addf2ac4817c4f3a1c50330c44a6b57 (diff)
downloadbcm5719-llvm-ef039a3ccdcd39c558c1d1a360b59bbb9bb11af5.tar.gz
bcm5719-llvm-ef039a3ccdcd39c558c1d1a360b59bbb9bb11af5.zip
[PowerPC][AIX] Adds support for writing the .data section in assembly files
Summary: Adds support for generating the .data section in assembly files for global variables with a non-zero initialization. The support for writing the .data section in XCOFF object files will be added in a follow-on patch. Any relocations are not included in this patch. Reviewers: hubert.reinterpretcast, sfertile, jasonliu, daltenty, Xiangling_L Reviewed by: hubert.reinterpretcast Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, wuzish, shchenz, DiggerLin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66154 llvm-svn: 369869
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index d59453aa1ca..861e5013b6b 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -770,6 +770,10 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) {
TextSection = Ctx->getXCOFFSection(
".text", XCOFF::StorageMappingClass::XMC_PR, XCOFF::XTY_SD,
XCOFF::C_HIDEXT, SectionKind::getText());
+
+ DataSection = Ctx->getXCOFFSection(
+ ".data", XCOFF::StorageMappingClass::XMC_RW, XCOFF::XTY_SD,
+ XCOFF::C_HIDEXT, SectionKind::getData());
}
void MCObjectFileInfo::InitMCObjectFileInfo(const Triple &TheTriple, bool PIC,
OpenPOWER on IntegriCloud