[PATCH] D66969: Output XCOFF object text section

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 13:53:00 PDT 2019


DiggerLin marked 3 inline comments as done.
DiggerLin added inline comments.


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:506
+    assert(alignTo(Address, DefaultSectionAlign) == Address &&
+           "Improperly aligned address for section.");
+    Text.Size = Address - StartAddress;
----------------
hubert.reinterpretcast wrote:
> The string text should probably be about the size not being properly padded to a multiple of the section alignment.
changed assert to Address= alignTo(Address, DefaultSectionAlign);


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:516
     BSS.Index = SectionIndex++;
-    assert(alignTo(Address, DefaultSectionAlign) == Address &&
-           "Improperly aligned address for section.");
+    assert(BSS.Index <= INT16_MAX && "BSS section index overflow!");
     uint32_t StartAddress = Address;
----------------
hubert.reinterpretcast wrote:
> Ditto regarding the assertion being too late.
the assert will be deleted


================
Comment at: llvm/test/CodeGen/PowerPC/aix-return55.ll:7
+  ret i32 55
+; CHECK-LABEL: foo
+; CHECK: li 3, 55
----------------
hubert.reinterpretcast wrote:
> `foo:` with the colon. `.foo:` if possible.
changed .thanks


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66969/new/

https://reviews.llvm.org/D66969





More information about the llvm-commits mailing list