diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/readelf.c | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1bbc075a..16673f14 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2009-04-14 Roland McGrath <[email protected]> + * readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM + like SHT_GNU_ATTRIBUTES. + * readelf.c (handle_core_registers): Fix error message. * strip.c (handle_elf: check_preserved): Don't note any change when 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; |
