readelf: Use elf_getshdrnum in print_shdr and print_phdr.
authorMark Wielaard <mark@klomp.org>
Sat, 4 Aug 2018 20:30:15 +0000 (22:30 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 13 Sep 2018 22:43:42 +0000 (00:43 +0200)
commit7859092379225482ffd4b49de2d18ad2d69ce810
tree89f7a2004e622bee4ee91c01956fe017dafea8f1
parentd5b050281e43754ac444e39d3e392831f4488c59
readelf: Use elf_getshdrnum in print_shdr and print_phdr.

print_shdr didn't print the correct number of sections if there were
more than SHN_LORESERVE sections. print_phdr wouldn't match up the
(allocated) sections and segements if there were more than SHN_LORESERVE
sections in the ELF file.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c