summaryrefslogtreecommitdiff
path: root/libebl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-07-08 00:53:24 -0700
committerUlrich Drepper <drepper@redhat.com>2009-07-08 00:53:24 -0700
commit70c442caa8296a698b395b8969b9a04d5491d47b (patch)
treeb4bae07225d5d7d0e1d1b21031f614132091d56c /libebl
parent46d5827cc232c689853b50181b17751aa7574128 (diff)
downloadelfutils-70c442caa8296a698b395b8969b9a04d5491d47b.tar.gz
Add support for STB_GNU_UNIQUE to libebl.
Diffstat (limited to 'libebl')
-rw-r--r--libebl/ChangeLog8
-rw-r--r--libebl/eblsymbolbindingname.c8
-rw-r--r--libebl/eblsymboltypename.c6
3 files changed, 20 insertions, 2 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 83319c70..12e94f42 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-08 Ulrich Drepper <drepper@redhat.com>
+
+ * eblsymbolbindingname.c (ebl_symbol_binding_name): Handle
+ STB_GNU_UNIQUE.
+
+ * eblsymboltypename.c (ebl_symbol_type_name): Only handle STT_GNU_IFUNC
+ if the binary is marked as being for Linux.
+
2009-04-01 Roland McGrath <roland@redhat.com>
* eblsymboltypename.c (ebl_symbol_type_name): Add STT_GNU_IFUNC.
diff --git a/libebl/eblsymbolbindingname.c b/libebl/eblsymbolbindingname.c
index c4412c9e..334a9c3e 100644
--- a/libebl/eblsymbolbindingname.c
+++ b/libebl/eblsymbolbindingname.c
@@ -1,5 +1,5 @@
/* Return symbol binding name.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -78,8 +78,14 @@ ebl_symbol_binding_name (ebl, binding, buf, len)
res = stb_names[binding];
else
{
+ char *ident;
+
if (binding >= STB_LOPROC && binding <= STB_HIPROC)
snprintf (buf, len, "LOPROC+%d", binding - STB_LOPROC);
+ else if (binding == STB_GNU_UNIQUE
+ && (ident = elf_getident (ebl->elf, NULL)) != NULL
+ && ident[EI_OSABI] == ELFOSABI_LINUX)
+ return "GNU_UNIQUE";
else if (binding >= STB_LOOS && binding <= STB_HIOS)
snprintf (buf, len, "LOOS+%d", binding - STB_LOOS);
else
diff --git a/libebl/eblsymboltypename.c b/libebl/eblsymboltypename.c
index 6aae13ee..f2ac6222 100644
--- a/libebl/eblsymboltypename.c
+++ b/libebl/eblsymboltypename.c
@@ -84,9 +84,13 @@ ebl_symbol_type_name (ebl, symbol, buf, len)
res = stt_names[symbol];
else
{
+ char *ident;
+
if (symbol >= STT_LOPROC && symbol <= STT_HIPROC)
snprintf (buf, len, "LOPROC+%d", symbol - STT_LOPROC);
- else if (symbol == STT_GNU_IFUNC)
+ else if (symbol == STT_GNU_IFUNC
+ && (ident = elf_getident (ebl->elf, NULL)) != NULL
+ && ident[EI_OSABI] == ELFOSABI_LINUX)
return "GNU_IFUNC";
else if (symbol >= STT_LOOS && symbol <= STT_HIOS)
snprintf (buf, len, "LOOS+%d", symbol - STT_LOOS);