[PATCH] D70798: [XCOFF][AIX] Emit TOC entries for object file generation

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 14:55:00 PST 2019


jasonliu created this revision.
jasonliu added reviewers: daltenty, DiggerLin, sfertile, hubert.reinterpretcast.
Herald added subscribers: llvm-commits, jsji, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

Implement emitTCEntry for PPCTargetXCOFFStreamer.
Add TC csects to TOCCsects for object file writing.

Note:

1. I did not include any raw data testing for this object file generation because TC entries raw data will all be 0 without relocation implemented. I will add raw data testing as part of relocation testing later.
2. I removed "Symbol->setFragment(F);" for common symbols because we don't need it, and if we have it then we would hit assertions below:

Assertion `(SymbolContents == SymContentsUnset || SymbolContents == SymContentsOffset) && "Cannot get offset for a common/variable symbol"' failed.


https://reviews.llvm.org/D70798

Files:
  llvm/lib/MC/MCXCOFFStreamer.cpp
  llvm/lib/MC/XCOFFObjectWriter.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
  llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70798.231327.patch
Type: text/x-patch
Size: 10237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191127/56a3c333/attachment.bin>


More information about the llvm-commits mailing list