[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369869 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Xing Xue
2019-08-25 15:17:25 +00:00
parent d55ea9f2a7
commit 325fca633f
10 changed files with 131 additions and 14 deletions
+4
View File
@@ -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,