From: Martin Liska Date: Thu, 24 Nov 2022 12:17:01 +0000 (+0100) Subject: readelf: Do not require EI_OSABI for IFUNC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffbbab0b3a1000f862b6d4ce3d9a76ed14f08801;p=binutils-gdb.git readelf: Do not require EI_OSABI for IFUNC. PR 29718 binutils/ChangeLog: * readelf.c (get_symbol_type): Consider STT_GNU_IFUNC as reserved name. --- 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