summaryrefslogtreecommitdiff
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
parent46d5827cc232c689853b50181b17751aa7574128 (diff)
downloadelfutils-70c442caa8296a698b395b8969b9a04d5491d47b.tar.gz
Add support for STB_GNU_UNIQUE to libebl.
-rw-r--r--NEWS2
-rw-r--r--libebl/ChangeLog8
-rw-r--r--libebl/eblsymbolbindingname.c8
-rw-r--r--libebl/eblsymboltypename.c6
-rw-r--r--libelf/ChangeLog4
-rw-r--r--libelf/elf.h1
6 files changed, 27 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2933d35a..1b73645f 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ libelf: Add elf_getshdrnum alias for elf_getshnum and elf_getshdrstrndx alias
for elf_getshstrndx and deprecate original names. Sun screwed up
their implementation and asked for a solution.
+libebl: Add support for STB_GNU_UNIQUE.
+
readelf: Add -N option, speeds up DWARF printing without address->name lookups.
Version 0.141:
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);
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index a0163db1..5d8ac8ae 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-08 Ulrich Drepper <drepper@redhat.com>
+
+ * elf.h: Update from glibc.
+
2009-06-13 Ulrich Drepper <drepper@redhat.com>
* Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and
diff --git a/libelf/elf.h b/libelf/elf.h
index 8fdf74b0..7efdedef 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -444,6 +444,7 @@ typedef struct
#define STB_WEAK 2 /* Weak symbol */
#define STB_NUM 3 /* Number of defined types. */
#define STB_LOOS 10 /* Start of OS-specific */
+#define STB_GNU_UNIQUE 10 /* Unique symbol. */
#define STB_HIOS 12 /* End of OS-specific */
#define STB_LOPROC 13 /* Start of processor-specific */
#define STB_HIPROC 15 /* End of processor-specific */