[PATCH] D71845: [AIX][XCOFF][AIX] Fix XCOFFObjectWriter assertion failure with alignment-related gap and improve text section output testing

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 17:10:31 PST 2020


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:442
 
+    // There could be gap (but no zero paddings) between each sections.
+    const MCSectionXCOFF *MCSec = (*Section->Groups[0])[0].MCCsect;
----------------
jasonliu wrote:
> DiggerLin wrote:
> > hubert.reinterpretcast wrote:
> > > Suggestion:
> > > There could be a gap (without corresponding zero padding) between sections. 
> > after I discussed with Jason offline , and we decide to delete the assertion finally 
> Just to clarify, I would still like to have an assertion. But Digger pointed out writing such assertion is non-trivial and the logic is complicated which might not fit in one assert statement. 
> I don't want to block this patch based on missing one assertion. But if other people feels strong about it and want to suggest a way to write the assertion, please indicate.
> 
> Nit: where is the new comment?? 
The major benefit of the assertion can be realized by merely asserting that `CurrentAddressLocation` is no greater than `Section->Address`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71845





More information about the llvm-commits mailing list