Hi Mao Han,
On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote:
> +const char *
> +csky_section_type_name (int type,
> + char *buf __attribute__ ((unused)),
> + size_t len __attribute__ ((unused)))
> +{
> + if (type == SHT_CSKY_ATTRIBUTES)
> + return "CSKY_ATTRIBUTES";
> +
> + return NULL;
> +}
As far as I can see this is like a SHT_GNU_ATTRIBUTES or
SHT_ARM_ATTRIBUTES section. If so, you will also want something like:
diff --git a/src/readelf.c b/src/readelf.c
index cda7c93..8017dc4 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -3571,7 +3571,9 @@ print_attributes (Ebl *ebl, const GElf_Ehdr
*ehdr)
if (shdr == NULL || (shdr->sh_type != SHT_GNU_ATTRIBUTES
&& (shdr->sh_type != SHT_ARM_ATTRIBUTES
- || ehdr->e_machine != EM_ARM)))
+ || ehdr->e_machine != EM_ARM)
+ && (shdr->sh_type != SHT_CSKY_ATTRIBUTES
+ || ehdr->e_machine != EM_CSKY)))
continue;
printf (gettext ("\
And then hook check_object_attribute to display any CSKY specific
attribute names/values.
Cheers,
Mark