summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-04-14 18:44:45 -0700
committerRoland McGrath <[email protected]>2009-04-15 02:10:30 -0700
commiteb9ba470ff1f65a85f47cd6c325acf836abd2af8 (patch)
treea271e321e639841421a724739fdde4e7da003ead /src/readelf.c
parent94f438311f24a11c17ab4d9ed73c6fdc9b059e3e (diff)
Nominal ARM support.
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c9
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;