HomePhabricator

[XCOFF] Output object text section header and symbol entry for program code.
Audit RequiredrL374923

Description

[XCOFF] Output object text section header and symbol entry for program code.

This is remaining part of rG41ca91f2995b: [AIX][XCOFF] Output XCOFF
object text section header and symbol entry for rogram code.

SUMMARY:
Original form of this patch is provided by Stefan Pintillie.

  1. The patch try to output program code section header , symbol entry for program code (PR) and Instruction into the raw text section.
  2. The patch include how to alignment and layout the CSection in the text section.
  3. The patch also reorganize the code , put some codes into a function. (XCOFFObjectWriter::writeSymbolTableEntryForControlSection)

Additional: We can not add raw data of text section test in the patch, If want
to output raw text section data,it need a function description patch first.

Reviewers: hubert.reinterpretcast, sfertile, jasonliu, xingxue.
Subscribers: wuzish, nemanjai, hiraditya, MaskRay, jsjji.

Differential Revision: https://reviews.llvm.org/D66969