[PATCH] addr2line: Use elf_getshdrstrndx not Ehdr field to print section name.

2018-10-24 Thread Mark Wielaard
Using the Ehdr field directly doesn't work when there are a large number of sections. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/addr2line.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bd6751a..5061cc1 100644

[PATCH] readelf: Use shstrndx to lookup section names.

2018-10-24 Thread Mark Wielaard
The function section_name would use the Ehdr e_shstrndx field to find the index of the section index string table directly. But it should use elf_getshdrstrndx. Adjust all callers. Signed-off-by: Mark Wielaard --- src/ChangeLog | 21 +++ src/readelf.c | 82 +++