]> git.ipfire.org Git - thirdparty/elfutils.git/commit
elflint: Add gnuld check when a NOBITS section falls inside a segment.
authorMark Wielaard <mjw@redhat.com>
Tue, 11 Aug 2015 22:11:26 +0000 (00:11 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 17 Aug 2015 12:33:24 +0000 (14:33 +0200)
commit0292aefb4c813d41fb1b2dd2d3a3c857a5c6349d
treec03242dd682ab49f50a1b01b8bb3e60f49bfe60b
parentc689d90c6eff870c85d381faed933a550a58dc0a
elflint: Add gnuld check when a NOBITS section falls inside a segment.

gnuld has a really bad bug where it can place a NOBITS section inside
a PT_LOAD segment. Normally that would not work. But it also makes sure
that the contents of the file is all zeros. So in practice it is actually
a PROGBITS section with all zero data. Except that other tools will think
there is an unused gap in the ELF file after the NOBITS section.

Recognize and check this pattern in elflint when --gnu is given.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/elflint.c