[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
Thu Oct 17 04:57:41 PDT 2019
labath created this revision.
labath added reviewers: amccarth, mstorsjo.
In an attempt to ensure that every part of the module's memory image is
accounted for, D56537 <https://reviews.llvm.org/D56537> created a special "container section" spanning the
entire image. While that seemed reasonable at the time (and it still
mostly does), it did create a problem of what to put as the "file size"
of the section, because the image is not continuous on disk, as we
generally assume (which is why I put zero there). Additionally, this
arrangement makes it unclear what kind of permissions should be assigned
to that section (which is what my next patch does).
To get around these, this patch partially reverts D56537 <https://reviews.llvm.org/D56537>, and goes back
to top-level sections. Instead, what I do is create a new "section" for
the object file header, which is also being loaded into memory, though
its not considered to be a section in the strictest sense. This makes it
possible to correctly assign file size section, and we can later assign
permissions to it as well.
https://reviews.llvm.org/D69100
Files:
source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
test/Shell/ObjectFile/PECOFF/sections.yaml
test/Shell/ObjectFile/PECOFF/subsections.yaml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69100.225402.patch
Type: text/x-patch
Size: 5633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191017/0db81744/attachment-0001.bin>
More information about the lldb-commits
mailing list