[Lldb-commits] [PATCH] D55757: ELF: Don't create sections for section 0

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 17 00:16:16 PST 2018


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

The first section header does not define a real section. Instead it is
used for various elf extensions. This patch skips creation of a section
for index 0.

This has one furtunate side-effect, as it allows us to use the section
header index as the Section ID (where 0 is also invalid), and allows us
to get rid of a lot of spurious +1s in the ObjectFileELF code.


https://reviews.llvm.org/D55757

Files:
  lit/Modules/ELF/many-sections.s
  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: D55757.178431.patch
Type: text/x-patch
Size: 6379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181217/50b7e363/attachment.bin>


More information about the lldb-commits mailing list