From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id AB8C038493FB for ; Thu, 24 Nov 2022 12:33:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB8C038493FB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id B74AB30008BB; Thu, 24 Nov 2022 13:33:13 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 6B77E5093B52; Thu, 24 Nov 2022 13:33:13 +0100 (CET) Message-ID: Subject: Re: [PATCH] libebl: Do not require EI_OSABI for IFUNC. From: Mark Wielaard To: Martin =?UTF-8?Q?Li=C5=A1ka?= , elfutils-devel@sourceware.org Date: Thu, 24 Nov 2022 13:33:13 +0100 In-Reply-To: <87cbeb0f-a329-ed9f-2d8b-35277cd0e5e6@suse.cz> References: <87cbeb0f-a329-ed9f-2d8b-35277cd0e5e6@suse.cz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-3032.9 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Martin, On Thu, 2022-11-24 at 13:23 +0100, Martin Li=C5=A1ka wrote: > Similar fix to: > https://sourceware.org/bugzilla/show_bug.cgi?id=3D29718 >=20 > Ready for master? Assuming runtime, glibc/ld.so, accepts this without EI_OSABI set to ELFOSABI_LINUX, it seems ok to print it as GNU_IFUNC. > else if (symbol =3D=3D STT_GNU_IFUNC > && ebl !=3D NULL > - && (ident =3D elf_getident (ebl->elf, NULL)) !=3D NULL > - && ident[EI_OSABI] =3D=3D ELFOSABI_LINUX) > - return "GNU_IFUNC"; > + && (ident =3D elf_getident (ebl->elf, NULL)) !=3D NULL) > + return "GNU_IFUNC"; /* Ignore EI_OSABI > + as STT_GNU_IFUNC is a reserved name. */ Note that you technically also don't need the elf_getident call anymore, except as sanity check that the ELF header can be read properly. OK, with and without that change. Cheers, Mark