From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id A86143832347; Thu, 24 Nov 2022 12:18:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A86143832347 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Martin Liska To: bfd-cvs@sourceware.org Subject: [binutils-gdb] readelf: Do not require EI_OSABI for IFUNC. X-Act-Checkin: binutils-gdb X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: 8ee52bcf39e95abbc9cfffbb0afbb55be67e8c3d X-Git-Newrev: ffbbab0b3a1000f862b6d4ce3d9a76ed14f08801 Message-Id: <20221124121854.A86143832347@sourceware.org> Date: Thu, 24 Nov 2022 12:18:54 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2022 12:18:54 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dffbbab0b3a10= 00f862b6d4ce3d9a76ed14f08801 commit ffbbab0b3a1000f862b6d4ce3d9a76ed14f08801 Author: Martin Liska Date: Thu Nov 24 13:17:01 2022 +0100 readelf: Do not require EI_OSABI for IFUNC. =20 PR 29718 =20 binutils/ChangeLog: =20 * readelf.c (get_symbol_type): Consider STT_GNU_IFUNC as reserved name. Diff: --- 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 >=3D STT_LOPROC && type <=3D STT_HIPROC) { @@ -12748,11 +12751,6 @@ get_symbol_type (Filedata * filedata, unsigned int= type) return "HP_STUB"; } =20 - if (type =3D=3D STT_GNU_IFUNC - && (filedata->file_header.e_ident[EI_OSABI] =3D=3D ELFOSABI_GNU - || filedata->file_header.e_ident[EI_OSABI] =3D=3D ELFOSABI_FREEBSD)) - return "IFUNC"; - snprintf (buff, sizeof (buff), _(": %d"), type); } else