[PATCH] D65159: [PowerPC][XCOFF] Adds support for writing the .bss section for object files.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 11:09:01 PDT 2019


sfertile created this revision.
sfertile added reviewers: hubert.reinterpretcast, jasonliu, xingxue, Xiangling_L.
Herald added subscribers: shchenz, wuzish, jsji, MaskRay, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

  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.
  - Calculate section sizes.
  - Build the section header table.
  - Assign the sections paw_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 auxiliary entries lands.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65159

Files:
  llvm/include/llvm/BinaryFormat/XCOFF.h
  llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
  llvm/include/llvm/MC/MCContext.h
  llvm/include/llvm/MC/MCSectionXCOFF.h
  llvm/include/llvm/MC/MCSymbolXCOFF.h
  llvm/include/llvm/MC/StringTableBuilder.h
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/MC/MCContext.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/lib/MC/MCXCOFFStreamer.cpp
  llvm/lib/MC/StringTableBuilder.cpp
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  llvm/test/CodeGen/PowerPC/aix-xcoff-common.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65159.211335.patch
Type: text/x-patch
Size: 29160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190723/e0beeeab/attachment.bin>


More information about the llvm-commits mailing list