diff options
| author | jasonliu <jasonliu.development@gmail.com> | 2019-12-04 16:22:57 +0000 |
|---|---|---|
| committer | jasonliu <jasonliu.development@gmail.com> | 2019-12-04 16:44:44 +0000 |
| commit | 5422e81a89f50263fd111841090b96cd0d49120a (patch) | |
| tree | 2fa3b8c6b1cccab1d7d9032bd062721d23cf8051 /llvm/lib/MC/MCXCOFFStreamer.cpp | |
| parent | 3ada8d2a87a2e818ea5302f40dbb0319d95b1554 (diff) | |
| download | bcm5719-llvm-5422e81a89f50263fd111841090b96cd0d49120a.tar.gz bcm5719-llvm-5422e81a89f50263fd111841090b96cd0d49120a.zip | |
[XCOFF][AIX] Emit TOC entries for object file generation
Summary:
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.
3.Fixed incorrect TOC-base alignment.
Differential Revision: https://reviews.llvm.org/D70798
Diffstat (limited to 'llvm/lib/MC/MCXCOFFStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCXCOFFStreamer.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCXCOFFStreamer.cpp b/llvm/lib/MC/MCXCOFFStreamer.cpp index c40a067e93e..6efa167ced4 100644 --- a/llvm/lib/MC/MCXCOFFStreamer.cpp +++ b/llvm/lib/MC/MCXCOFFStreamer.cpp @@ -50,12 +50,6 @@ void MCXCOFFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, XCOFF::C_HIDEXT); Symbol->setCommon(Size, ByteAlignment); - // Need to add this symbol to the current Fragment which will belong to the - // containing CSECT. - auto *F = dyn_cast_or_null<MCDataFragment>(getCurrentFragment()); - assert(F && "Expected a valid section with a fragment set."); - Symbol->setFragment(F); - // Emit the alignment and storage for the variable to the section. EmitValueToAlignment(ByteAlignment); EmitZeros(Size); |

