From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 363EA384F6FB for ; Thu, 24 Nov 2022 12:27:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 363EA384F6FB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 77D6723A; Thu, 24 Nov 2022 04:27:22 -0800 (PST) Received: from [10.57.5.59] (unknown [10.57.5.59]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5620C3F73B; Thu, 24 Nov 2022 04:27:15 -0800 (PST) Message-ID: <576909d9-5f6e-fabe-d9b2-9f3c3001a255@foss.arm.com> Date: Thu, 24 Nov 2022 12:27:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH][PUSHED] readelf: Do not require EI_OSABI for IFUNC. Content-Language: en-GB To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , binutils@sourceware.org Cc: Nick Clifton References: <9790982d-5a3d-f711-b588-184edd41a0dd@suse.cz> From: Richard Earnshaw In-Reply-To: <9790982d-5a3d-f711-b588-184edd41a0dd@suse.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3495.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 24/11/2022 12:18, Martin Liška wrote: > Pushed as it's pre-approved by Nick. > > Cheers, > Martin > > PR29718 > > binutils/ChangeLog: > > * readelf.c (get_symbol_type): Consider STT_GNU_IFUNC as > reserved name. STT_GNU_IFUNC is defined in the OS-specific reserved space. How can it be globally reserved? It can't have meaning unless the OS ABI defines it as this. R. > --- > binutils/readelf.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/binutils/readelf.c b/binutils/readelf.c > index 1bd6df9448a..365c1ede0a1 100644 > --- a/binutils/readelf.c > +++ b/binutils/readelf.c > @@ -12724,6 +12724,9 @@ get_symbol_type (Filedata * filedata, unsigned int type) > case STT_TLS: return "TLS"; > case STT_RELC: return "RELC"; > case STT_SRELC: return "SRELC"; > + case STT_GNU_IFUNC: return "IFUNC"; /* As mentioned in PR29718, do not > + require EI_OSABI as IFUNC is > + a reseved name. */ > default: > if (type >= STT_LOPROC && type <= STT_HIPROC) > { > @@ -12748,11 +12751,6 @@ get_symbol_type (Filedata * filedata, unsigned int type) > return "HP_STUB"; > } > > - if (type == STT_GNU_IFUNC > - && (filedata->file_header.e_ident[EI_OSABI] == ELFOSABI_GNU > - || filedata->file_header.e_ident[EI_OSABI] == ELFOSABI_FREEBSD)) > - return "IFUNC"; > - > snprintf (buff, sizeof (buff), _(": %d"), type); > } > else