|
From: | Mike Murphy |
Subject: | readelf reporting of e_shstrndx is slightly wrong |
Date: | Fri, 17 Aug 2018 20:53:51 +0000 |
According to the ELF standard:
This member holds the section header table index of the entry associated with the section name string table. If the file has no section name string table, this member holds the value
If the section name string table section index is greater than or equal to
The current readelf -h seems to assume that if there are more than 0xff00 sections, then the shstrndx will also be past that. But there is nothing to prevent the section name string table from being section 1, in which case e_shstrndx
should just be 1. But the readelf implementation has: else if (elf_header.e_shstrndx != SHN_UNDEF && elf_header.e_shstrndx >= elf_header.e_shnum) printf(_(“<corrupt: out of range>”));
|
[Prev in Thread] | Current Thread | [Next in Thread] |