diff options
author | Nick Clifton <nickc@redhat.com> | 2002-11-06 17:00:57 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-11-06 17:00:57 +0000 |
commit | 4d5166f651d92d9e71260a085e807f99c5ded45f (patch) | |
tree | baecd3c8d05350eee150c2bfd2ce77ae6951b6fb /binutils | |
parent | 2c16fea02b3be3ed77eccd05f00859a723c59b32 (diff) | |
download | binutils-redhat-4d5166f651d92d9e71260a085e807f99c5ded45f.tar.gz |
Add hex number to PROCESSOR-specific, OS-specific, and reserved symbol types.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/readelf.c | 18 |
2 files changed, 14 insertions, 9 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 33b1c3f745..856a910167 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2002-11-06 Hiroyuki Machida <machida@sm.sony.co.jp> + + * readelf.c (get_symbol_index_type): Add hex number to + PROCESSOR-specific, OS-specific, and reserved symbol types. + 2002-11-04 Alan Modra <amodra@bigpond.net.au> * readelf.c (byte_get_little_endian): Comment typo fix. diff --git a/binutils/readelf.c b/binutils/readelf.c index ab5955f61b..f381e2393a 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 * |