[PATCH] D42872: Fix handling of zero-size segments in llvm-objcopy
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 03:01:01 PST 2018
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
LGTM, with a couple of nits in the comments.
================
Comment at: tools/llvm-objcopy/Object.cpp:945-948
// The size of ELF + program headers will not change so it is ok to assume
// that the first offset of the first segment is a good place to start
// outputting sections. This covers both the standard case and the PT_PHDR
// case.
----------------
jhenderson wrote:
> This comment needs updating/removing.
I might rephrase/extend this slightly. Something like:
"Offset is used as the start offset of the first segment to be laid out. Since the ELF Header (ElfHdrSegment) must be at the start of the file, we start at offfset 0."
================
Comment at: tools/llvm-objcopy/Object.h:563
+ Segment ElfHdrSegment;
+ Segment ProgramHdrSegment;
----------------
jhenderson wrote:
> We should have a comment here explaining why we have these two special segments.
case that ELF header -> case that the ELF header
Repository:
rL LLVM
https://reviews.llvm.org/D42872
More information about the llvm-commits
mailing list