owenpshaw added inline comments.

================
Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:3478
+    auto header = GetProgramHeaderByIndex(i);
+    if (header->p_paddr != 0)
+      return true;
----------------
clayborg wrote:
> Can't p_paddr be zero and still be valid? Would a better test be 
> "header->p_memsz > 0"?
Yes, a 0 paddr can be valid.  This check will only ignore paddr if all segments 
have a 0 paddr, suggesting the linker didn't populate that field.

This decision is similar to what I did in llvm-objcopy for binary output, which 
in turn was based on GNU objcopy behavior: 
https://bugs.llvm.org/show_bug.cgi?id=35708#c4


https://reviews.llvm.org/D42145



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to