summaryrefslogtreecommitdiffstats
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-29 16:51:37 +0000
committerNick Clifton <nickc@redhat.com>2011-06-29 16:51:37 +0000
commita7dbfd1c34af172f068c00d70d5759c797c2db52 (patch)
tree4fbd2596981a1f6ed80b13993b6e41df00f9b80d /binutils
parent49c62a3353799da5cdd3d87d35a944026b88fcee (diff)
downloadppe42-binutils-a7dbfd1c34af172f068c00d70d5759c797c2db52.tar.gz
ppe42-binutils-a7dbfd1c34af172f068c00d70d5759c797c2db52.zip
* readelf.c (get_section_type_name): When displaying an unknown
section type display the hex value first on the assumption that the full message will probably be truncated into a 15 character field.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/readelf.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index edb87600c5..69140c2770 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-29 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_section_type_name): When displaying an unknown
+ section type display the hex value first on the assumption that
+ the full message will probably be truncated into a 15 character
+ field.
+
2011-06-22 Jakub Jelinek <jakub@redhat.com>
* dwarf.c (decode_location_expression): For DW_OP_GNU_convert and
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 5a6521c54f..c1bc2c5f8f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3084,7 +3084,9 @@ get_section_type_name (unsigned int sh_type)
else if ((sh_type >= SHT_LOUSER) && (sh_type <= SHT_HIUSER))
sprintf (buff, "LOUSER+%x", sh_type - SHT_LOUSER);
else
- snprintf (buff, sizeof (buff), _("<unknown>: %x"), sh_type);
+ /* This message is probably going to be displayed in a 15
+ character wide field, so put the hex value first. */
+ snprintf (buff, sizeof (buff), _("%08x: <unknown>"), sh_type);
return buff;
}
OpenPOWER on IntegriCloud