From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id D7AF73861832 for ; Thu, 24 Nov 2022 12:45:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D7AF73861832 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2171421889; Thu, 24 Nov 2022 12:45:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669293935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ltxEH1zy9I+OgKqa7kvgvncygVvv2YDa2Tgj10X81p8=; b=ab/S3WSR52W36te/+Sg2o5ybCTAR8UYJ7shz+7Ps3HPCyTiNyDI/PaoQIiU9Xz9VwAVuFr 45SWLJkpne866Z1acb2WAVD188hbMD7brWSGoA58qlnPbZsNjja3yUI6qoPHaIYE5Ds6DV DSj7G4E7QAnprMT6RqThrAXavcdh/wc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669293935; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ltxEH1zy9I+OgKqa7kvgvncygVvv2YDa2Tgj10X81p8=; b=QbgUHlygzslqUuW8vMXUw04L2vpiKTZ1fYPoOYTACD/7ClIb4bTM/wss1Hk9cKd96H0xf3 Qg290iU2TyW4ZFCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0499D13488; Thu, 24 Nov 2022 12:45:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8caMO25nf2ODDQAAMHmgww (envelope-from ); Thu, 24 Nov 2022 12:45:34 +0000 Message-ID: <904e8571-5504-b738-91a3-bbaf61834102@suse.cz> Date: Thu, 24 Nov 2022 13:45:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH][PUSHED] readelf: Do not require EI_OSABI for IFUNC. Content-Language: en-US To: Richard Earnshaw , binutils@sourceware.org Cc: Nick Clifton References: <9790982d-5a3d-f711-b588-184edd41a0dd@suse.cz> <576909d9-5f6e-fabe-d9b2-9f3c3001a255@foss.arm.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <576909d9-5f6e-fabe-d9b2-9f3c3001a255@foss.arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_SOFTFAIL,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 11/24/22 13:27, Richard Earnshaw wrote: > 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. https://sourceware.org/bugzilla/show_bug.cgi?id=29718#c0 Please reply to this PR. Thanks, Martin > > 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