[all-commits] [llvm/llvm-project] 73a7a5: lldb/COFF: Create a separate "section" for the fil...

plabath via All-commits all-commits at lists.llvm.org
Fri Oct 25 15:12:01 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 73a7a55c0ec976fecadd7a872d24d850f8cd793a
      https://github.com/llvm/llvm-project/commit/73a7a55c0ec976fecadd7a872d24d850f8cd793a
  Author: Pavel Labath <labath at google.com>
  Date:   2019-10-25 (Fri, 25 Oct 2019)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    M lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
    R lldb/test/Shell/ObjectFile/PECOFF/subsections.yaml

  Log Message:
  -----------
  lldb/COFF: Create a separate "section" for the file header

In an attempt to ensure that every part of the module's memory image is
accounted for, 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, 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.

Reviewers: amccarth, mstorsjo

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D69100




More information about the All-commits mailing list