]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
readelf: Handle SHT_RISCV_ATTRIBUTES like SHT_GNU_ATTRIBUTES
authorAndreas Schwab <schwab@suse.de>
Wed, 10 Aug 2022 08:52:42 +0000 (10:52 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 13 Aug 2022 18:54:53 +0000 (20:54 +0200)
Signed-off-by: Andreas Schwab <schwab@suse.de>
src/ChangeLog
src/readelf.c

index fbcef29e3e73ea8c2b615249da505cbc877d7031..88db40511b26b1318be05372f16515a7c702fdaa 100644 (file)
@@ -1,3 +1,7 @@
+2022-08-10  Andreas Schwab  <schwab@suse.de>
+
+       * readelf.c (print_attributes): Also handle SHT_RISCV_ATTRIBUTES.
+
 2022-08-09  Andreas Schwab  <schwab@suse.de>
 
        * elflint.c (check_program_header): Don't complain about p_filesz
index f1f77ce81ccc59bed7315f1e98f77c9382d0dd55..1a10fd01eabaa1af231335c3c3cbc3ec8b1fdbc3 100644 (file)
@@ -3672,7 +3672,9 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr)
                           && (shdr->sh_type != SHT_ARM_ATTRIBUTES
                               || ehdr->e_machine != EM_ARM)
                           && (shdr->sh_type != SHT_CSKY_ATTRIBUTES
-                              || ehdr->e_machine != EM_CSKY)))
+                              || ehdr->e_machine != EM_CSKY)
+                          && (shdr->sh_type != SHT_RISCV_ATTRIBUTES
+                              || ehdr->e_machine != EM_RISCV)))
        continue;
 
       printf (_("\