This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY
- From: Mark Wielaard <mark at klomp dot org>
- To: Mao Han <han_mao at c-sky dot com>
- Cc: elfutils-devel at sourceware dot org
- Date: Sun, 14 Jul 2019 23:02:57 +0200
- Subject: Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY
- References: <cover.1559544994.git.han_mao@c-sky.com> <ede2a66649573ab580c63a6e81c39b0414a8de6c.1559544994.git.han_mao@c-sky.com> <d7f8706bbcde73bd26e41970055ed24a183544c9.camel@klomp.org> <20190711031900.GA943@vmh-VirtualBox>
On Thu, 2019-07-11 at 11:19 +0800, Mao Han wrote:
> On Thu, Jul 11, 2019 at 12:11:17AM +0200, Mark Wielaard wrote:
> > 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.
>
> Ok, I'll add check for C-SKY here.
BTW. I couldn't find what generates the SHT_CSKY_ATTRIBUTES or what the
defined attribute constants are. Are they documented somewhere?
Thanks,
Mark