[Lldb-commits] [PATCH] D69100: COFF: Create a separate "section" for the file header

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 21 14:04:57 PDT 2019


labath added a comment.

In D69100#1717251 <https://reviews.llvm.org/D69100#1717251>, @amccarth wrote:

> I'm OK with this.  I'm just wondering whether it would be a good idea to make it clear that these header sections are "not considered to be a section in the strictest sense."  Is the distinction going to be important to future code readers?  Do we already have "sections" that aren't truly "sections"?
>
> Perhaps just a comment where the header sections are created?


Both ELF and MachO have the concept of a "segment", which is the thing which describes how objects are loaded into memory. These are also represented as "sections" in lldb (and real sections are their "subsections"). However, this is the only case where we're inventing a "section" out of thin air, but that seems reasonable as neither elf nor mach-o have a concept of a piece of file which is loaded into memory, but is not a part of any section/segment.

So yeah, sure, adding a comment sounds like a good idea.


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

https://reviews.llvm.org/D69100





More information about the lldb-commits mailing list