HomePhabricator

ELF: Don't create sections for section header index 0

Authored by labath on Dec 18 2018, 7:56 AM.

Description

ELF: Don't create sections for section header index 0

Summary:
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, in that it allows us to use the section
header index as the Section ID (where 0 is also invalid). This way, we
can get rid of a lot of spurious +1s in the ObjectFileELF code.

Reviewers: clayborg, krytarowski, joerg, espindola

Subscribers: emaste, lldb-commits, arichardson

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

llvm-svn: 349498

Details

Committed
labathDec 18 2018, 7:56 AM
Differential Revision
D55757: ELF: Don't create sections for section header index 0
Parents
rG94d2d09c7626: Emit -Wformat properly for bit-field promotions.
Branches
Unknown
Tags
Unknown