Use elf_getphdrnum instead of accessing ehdr->e_phnum directly.
authorMark Wielaard <mjw@redhat.com>
Sat, 22 Nov 2014 22:08:48 +0000 (23:08 +0100)
committerMark Wielaard <mjw@redhat.com>
Wed, 26 Nov 2014 19:17:22 +0000 (20:17 +0100)
commit712c8faddc08844fb1f2814c8b6e817f03b0698e
treedf68a29bd32a009875438dfbbd68cbe6f30425c0
parent2deeb7c51020df07d752107cdc6822d70ae1da4e
Use elf_getphdrnum instead of accessing ehdr->e_phnum directly.

Using elf_getphdrnum lets us handle ELF files that use more than PN_XNUM
phdrs. And guards against some corrupt files.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
17 files changed:
backends/ChangeLog
backends/ppc64_symbol.c
backends/ppc_symbol.c
libdwfl/ChangeLog
libdwfl/link_map.c
libebl/ChangeLog
libebl/ebl-hooks.h
libebl/eblbsspltp.c
libebl/eblopenbackend.c
libebl/libebl.h
src/ChangeLog
src/elflint.c
src/findtextrel.c
src/readelf.c
src/size.c
src/strip.c
src/unstrip.c