[PATCH] D70859: [BUG-FIX][XCOFF] fixed a bug of XCOFFObjectFile.cpp when there is padding at the last csect of a sections

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 13:59:02 PST 2019


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


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:359
 
-    assert(CurrentAddressLocation == Section->Address &&
-           "We should have no padding between sections.");
+    CurrentAddressLocation = Section->Address;
     for (const auto *Group : Section->Groups) {
----------------
hubert.reinterpretcast wrote:
> daltenty wrote:
> > Combine this with the declaration
> The assert has the effect to detecting if we assigned the section addresses in a different order than we are writing the sections. We should update the assert to indicate that `"We should be writing sections consecutively."`
thank for reminding me the problem.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70859





More information about the llvm-commits mailing list