diff options
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/readelf.c b/src/readelf.c index 05382239..773fc7d7 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -2824,7 +2824,9 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); - if (shdr == NULL || shdr->sh_type != SHT_GNU_ATTRIBUTES) + if (shdr == NULL || (shdr->sh_type != SHT_GNU_ATTRIBUTES + && (shdr->sh_type != SHT_ARM_ATTRIBUTES + || ehdr->e_machine != EM_ARM))) continue; printf (gettext ("\ @@ -2871,8 +2873,9 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) printf (gettext (" %-13s %4" PRIu32 "\n"), name, len); - if (q - name == sizeof "gnu" - && !memcmp (name, "gnu", sizeof "gnu")) + if (shdr->sh_type != SHT_GNU_ATTRIBUTES + || (q - name == sizeof "gnu" + && !memcmp (name, "gnu", sizeof "gnu"))) while (q < p) { const unsigned char *const sub = q; |
