diff options
author | Martin Liska <mliska@suse.cz> | 2022-11-25 14:00:26 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-11-25 14:00:26 +0100 |
commit | 8654c01f085f77e443185d0a61a106880bb060b9 (patch) | |
tree | 3d564ded7cd904478444bbebd334df99fbe888cd /binutils | |
parent | ac8df5a1921904b3928429e696ad8b40c612f829 (diff) | |
download | gdb-8654c01f085f77e443185d0a61a106880bb060b9.zip gdb-8654c01f085f77e443185d0a61a106880bb060b9.tar.gz gdb-8654c01f085f77e443185d0a61a106880bb060b9.tar.bz2 |
Revert "readelf: Do not require EI_OSABI for IFUNC."
This reverts commit ffbbab0b3a1000f862b6d4ce3d9a76ed14f08801.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/readelf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 365c1ed..1bd6df9 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -12724,9 +12724,6 @@ 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) { @@ -12751,6 +12748,11 @@ 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), _("<OS specific>: %d"), type); } else |