aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-11-06 17:00:57 +0000
committerNick Clifton <nickc@redhat.com>2002-11-06 17:00:57 +0000
commit5cf1065c254b9b71636663c33307a8162fdccaf4 (patch)
tree6b0583d122075f29a55a6da856ab31fd6d3c22b2 /binutils/readelf.c
parent3af9a47b1c2bef84a3d162e6bcea545212dd1e60 (diff)
downloadgdb-5cf1065c254b9b71636663c33307a8162fdccaf4.zip
gdb-5cf1065c254b9b71636663c33307a8162fdccaf4.tar.gz
gdb-5cf1065c254b9b71636663c33307a8162fdccaf4.tar.bz2
Add hex number to PROCESSOR-specific, OS-specific, and reserved symbol types.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index ab5955f..f381e23 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5514,6 +5514,8 @@ static const char *
get_symbol_index_type (type)
unsigned int type;
{
+ static char buff [32];
+
switch (type)
{
case SHN_UNDEF: return "UND";
@@ -5521,19 +5523,17 @@ get_symbol_index_type (type)
case SHN_COMMON: return "COM";
default:
if (type >= SHN_LOPROC && type <= SHN_HIPROC)
- return "PRC";
+ sprintf (buff, "PRC[0x%04x]", type);
else if (type >= SHN_LOOS && type <= SHN_HIOS)
- return "OS ";
+ sprintf (buff, "OS [0x%04x]", type);
else if (type >= SHN_LORESERVE && type <= SHN_HIRESERVE)
- return "RSV";
+ sprintf (buff, "RSV[0x%04x]", type);
else
- {
- static char buff [32];
-
- sprintf (buff, "%3d", type);
- return buff;
- }
+ sprintf (buff, "%3d", type);
+ break;
}
+
+ return buff;
}
static int *