[PATCH] D66969: Output XCOFF object text section header and symbol entry for program code
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 10:26:08 PDT 2019
sfertile added a comment.
We need to verify if we need the storage padding or not before finalizing, but otherwise the patch looks pretty good.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:69
uint32_t Size;
+ uint32_t PaddingSize;
----------------
We might be able to skip writing the actual zeros for padding, and instead just pad out the virtual addresses assigned to the sections/csects. I believe @hubert.reinterpretcast was following up with one of the AIX system toolchain devs to verify.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:537
BSS.Index = SectionIndex++;
- assert(alignTo(Address, DefaultSectionAlign) == Address &&
- "Improperly aligned address for section.");
- uint32_t StartAddress = Address;
+ // We use alignment Address of previous section as BSS start Address, it
+ // maybe not need.
----------------
I'm sorry Digger, but I am having trouble figuring out what the comment is trying to convey.
Is it that each section is padded out to `DefaultSectionAlign` so that `Address` must be properly aligned already?
Is it trying to explain how we don't have to align the sections virtual address anymore then `DefaultSectionAlign` (even when contained csects may be more strictly aligned then that) becuase the sections alignment is immaterial?
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