From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6432 invoked by alias); 10 Jul 2019 22:11:21 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 6415 invoked by uid 89); 10 Jul 2019 22:11:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-18.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1056 X-Spam-Status: No, score=-18.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Jul 2019 22:11:19 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 981A8307C297; Thu, 11 Jul 2019 00:11:17 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 4ED73413CC0E; Thu, 11 Jul 2019 00:11:17 +0200 (CEST) Message-ID: Subject: Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY From: Mark Wielaard To: Mao Han , elfutils-devel@sourceware.org Date: Wed, 10 Jul 2019 22:11:00 -0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-2.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00041.txt.bz2 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 =3D=3D 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) =20 if (shdr =3D=3D NULL || (shdr->sh_type !=3D SHT_GNU_ATTRIBUTES && (shdr->sh_type !=3D SHT_ARM_ATTRIBUTES - || ehdr->e_machine !=3D EM_ARM))) + || ehdr->e_machine !=3D EM_ARM) + && (shdr->sh_type !=3D SHT_CSKY_ATTRIBUTES + || ehdr->e_machine !=3D EM_CSKY))) continue; =20 printf (gettext ("\ And then hook check_object_attribute to display any CSKY specific attribute names/values. Cheers, Mark