[PATCH] D78709: [llvm-readobj] - Simplify conditions used for printing segment mappings. NFCI.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 04:17:49 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:4083
+
+  // No section with zero size must be at the start or at the end of PT_DYNAMIC.
   return ((Sec.sh_type == ELF::SHT_NOBITS) ||
----------------
grimar wrote:
> jhenderson wrote:
> > This comment belongs with the above if, I think.
> I think no. It seems to be about 
> 
> "(Sec.sh_offset > Phdr.p_offset && Sec.sh_offset < Phdr.p_offset + Phdr.p_filesz)"
> 
> One of conditions to get here is to have "Sec.sh_size == 0".
This comment is to do with sections with zero size and PT_DYNAMIC, so the comment belongs with the zero size/PT_DYNAMIC check surely?


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

https://reviews.llvm.org/D78709





More information about the llvm-commits mailing list