summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2019-08-20 22:03:18 +0000
committerSean Fertile <sfertile@ca.ibm.com>2019-08-20 22:03:18 +0000
commit1e46d4cec535588dec8653757894d890e38942cb (patch)
treec3d86ba516175b1fd96499269022ef638f51d2b9 /llvm/lib/MC/MCObjectFileInfo.cpp
parent27a313ebde156f2db5f071a10444c9df8c332fc6 (diff)
downloadbcm5719-llvm-1e46d4cec535588dec8653757894d890e38942cb.tar.gz
bcm5719-llvm-1e46d4cec535588dec8653757894d890e38942cb.zip
Adds support for writing the .bss section for XCOFF object files.
Adds Wrapper classes for MCSymbol and MCSection into the XCOFF target object writer. Also adds a class to represent the top-level sections, which we materialize in the ObjectWriter. executePostLayoutBinding will map all csects into the appropriate container depending on its storage mapping class, and map all symbols into their containing csect. Once all symbols have been processed we - Assign addresses and symbol table indices. - Calaculte section sizes. - Build the section header table. - Assign the sections raw-pointer value for non-virtual sections. Since the .bss section is virtual, writing the header table is enough to add support. Writing of a sections raw data, or of any relocations is not included in this patch. Testing is done by dumping the section header table, but it needs to be extended to include dumping the symbol table once readobj support for dumping auxiallary entries lands. Differential Revision: https://reviews.llvm.org/D65159 llvm-svn: 369454
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp
index 6dc0e38e8e8..d59453aa1ca 100644
--- a/llvm/lib/MC/MCObjectFileInfo.cpp
+++ b/llvm/lib/MC/MCObjectFileInfo.cpp
@@ -767,9 +767,9 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) {
// get placed into this csect. The choice of csect name is not a property of
// the ABI or object file format. For example, the XL compiler uses an unnamed
// csect for program code.
- TextSection =
- Ctx->getXCOFFSection(".text", XCOFF::StorageMappingClass::XMC_PR,
- XCOFF::XTY_SD, SectionKind::getText());
+ TextSection = Ctx->getXCOFFSection(
+ ".text", XCOFF::StorageMappingClass::XMC_PR, XCOFF::XTY_SD,
+ XCOFF::C_HIDEXT, SectionKind::getText());
}
void MCObjectFileInfo::InitMCObjectFileInfo(const Triple &TheTriple, bool PIC,
OpenPOWER on IntegriCloud