[Lldb-commits] [PATCH] D55706: ELF: more section creation cleanup

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 14 07:37:34 PST 2018


labath created this revision.
labath added reviewers: clayborg, krytarowski.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.

This patch attempts to move as much code as possible out of the
CreateSections function to make room for future improvements there. Some
of this may be slightly over-engineered (VMAddressProvider), but I
wanted to keep the logic of this function very simple, because once I
start taking segment headers into acount (as discussed in D55356 <https://reviews.llvm.org/D55356>), the
function is going to grow significantly.

While in there, I also added tests for various bits of functionality.

This should be NFC, except that I changed the order of hac^H^Heuristicks
for determining section type slightly. Previously, name-based deduction
(.symtab -> symtab) would take precedence over type-based (SHT_SYMTAB ->
symtab) one. In fact we would assert if we ran into a .text section with
type SHT_SYMTAB. Though unlikely to matter in practice, this order
seemed wrong to me, so I have inverted it.


https://reviews.llvm.org/D55706

Files:
  lit/Modules/ELF/compressed-sections.yaml
  lit/Modules/ELF/section-addresses.yaml
  lit/Modules/ELF/section-permissions.yaml
  lit/Modules/ELF/section-types-edgecases.yaml
  lit/Modules/ELF/section-types.yaml
  lit/Modules/MachO/subsections.yaml
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  source/Plugins/ObjectFile/ELF/ObjectFileELF.h
  tools/lldb-test/lldb-test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55706.178231.patch
Type: text/x-patch
Size: 16287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181214/1e7e1ef3/attachment-0001.bin>


More information about the lldb-commits mailing list