bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29718] readelf prints out "<OS specific>: 10" instead of "


From: mliska at suse dot cz
Subject: [Bug binutils/29718] readelf prints out "<OS specific>: 10" instead of "IFUNC"
Date: Tue, 25 Oct 2022 06:25:59 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29718

Martin Liska <mliska at suse dot cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjw at fedoraproject dot org

--- Comment #1 from Martin Liska <mliska at suse dot cz> ---
Looking into readelf, I see the ident[EI_OSABI] == 0, thus it can be fixed
with:

diff --git a/libebl/eblsymboltypename.c b/libebl/eblsymboltypename.c
index 0ff1722a..a5db53b0 100644
--- a/libebl/eblsymboltypename.c
+++ b/libebl/eblsymboltypename.c
@@ -65,8 +65,7 @@ ebl_symbol_type_name (Ebl *ebl, int symbol, char *buf, size_t
len)
            snprintf (buf, len, "LOPROC+%d", symbol - STT_LOPROC);
          else if (symbol == STT_GNU_IFUNC
                   && ebl != NULL
-                  && (ident = elf_getident (ebl->elf, NULL)) != NULL
-                  && ident[EI_OSABI] == ELFOSABI_LINUX)
+                  && (ident = elf_getident (ebl->elf, NULL)) != NULL)
            return "GNU_IFUNC";
          else if (symbol >= STT_LOOS && symbol <= STT_HIOS)
            snprintf (buf, len, "LOOS+%d", symbol - STT_LOOS);

and one gets then:

./src/readelf -s /home/marxin/Programming/testcases/a.out | grep strcmp
    2: 0000000000000000      0 GNU_IFUNC GLOBAL DEFAULT    UNDEF
strcmp@GLIBC_2.2.5 (2)

@Mark: What do you think about such a change?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]