[PATCH] D81887: [lld-macho] Refactor segment/section creation, sorting, and merging
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 16:27:37 PDT 2020
MaskRay accepted this revision.
MaskRay added a comment.
LGTM.
================
Comment at: lld/MachO/Writer.cpp:458
- for (auto &p : seg->getSections()) {
- OutputSection *section = p.second;
- addr = alignTo(addr, section->align);
- fileOff = alignTo(fileOff, section->align);
- section->addr = addr;
- section->fileOff = isZeroFill(section->flags) ? 0 : fileOff;
- section->finalize();
+ for (auto *osec : seg->getSections()) {
+ addr = alignTo(addr, osec->align);
----------------
compnerd wrote:
> s/osec/section/?
osec looks fine. I appreciate that in some places of ELF/ we use `osec` to emphasize that it is an OutputSection, not an InputSection.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81887/new/
https://reviews.llvm.org/D81887
More information about the llvm-commits
mailing list