[PATCH] D67125: [PowerPC][AIX] Adds support for writing the data section in object files

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 13:46:33 PDT 2019


hubert.reinterpretcast added a comment.

Just following up on my previous comments on this patch based on developments in D66969 <https://reviews.llvm.org/D66969>.



================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:538
+    Sections.push_back(&Data);
+    Data.Index = SectionIndex++;
+    Data.Address = SectionStartAddress;
----------------
hubert.reinterpretcast wrote:
> In D66969, we try to check for overflow on the section index. We should do so here too to be consistent.
We stopped checking for overflow on the section index (at least for now). There is a limited number of sections that we will generate.


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:566
     BSS.Index = SectionIndex++;
-    uint32_t StartAddress = Address;
+    BSS.Address = SectionStartAddress;
+    uint32_t Address = SectionStartAddress;
----------------
hubert.reinterpretcast wrote:
> This belongs in D66969 and not here. @DiggerLin, please fix.
The review of D66969 ended up with the conclusion that adding `SectionStartAddress` does not help readability.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67125





More information about the llvm-commits mailing list