mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user