public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Revert "readelf: Do not require EI_OSABI for IFUNC."
@ 2022-11-25 13:00 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-11-25 13:00 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8654c01f085f77e443185d0a61a106880bb060b9

commit 8654c01f085f77e443185d0a61a106880bb060b9
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Nov 25 14:00:26 2022 +0100

    Revert "readelf: Do not require EI_OSABI for IFUNC."
    
    This reverts commit ffbbab0b3a1000f862b6d4ce3d9a76ed14f08801.

Diff:
---
 binutils/readelf.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 365c1ede0a1..1bd6df9448a 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-25 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 13:00 [binutils-gdb] Revert "readelf: Do not require EI_OSABI for IFUNC." Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).