[PATCH] D84574: [lld-macho] Fix segment filesize calculation
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 27 15:14:57 PDT 2020
compnerd accepted this revision.
compnerd added a comment.
This revision is now accepted and ready to land.
I think that the `assert` would be better than the comment, but not worth blocking on.
================
Comment at: lld/MachO/Writer.cpp:137
for (OutputSection *osec : seg->getSections()) {
- c->filesize += osec->getFileSize();
+ // This condition should hold unless we are dealing with a __bss section.
+ if (osec->fileOff >= seg->fileOff)
----------------
I wonder if that should just be an assert instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84574/new/
https://reviews.llvm.org/D84574
More information about the llvm-commits
mailing list