From 220453ec97481311a3cfd0d1a191c1bfe24f3b53 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 19 Feb 2010 01:36:39 +0000 Subject: [PATCH] * readelf.c (get_group_flags): Return empty string when flags zero. Add space in other returned values. (process_section_groups): Adjust format string. --- binutils/ChangeLog | 6 ++++++ binutils/readelf.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index c494961c110..0bab9978ebf 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2010-02-19 Alan Modra + + * readelf.c (get_group_flags): Return empty string when flags zero. + Add space in other returned values. + (process_section_groups): Adjust format string. + 2010-02-18 Matthew Gretton-Dann * readelf.c (arm_attr_tag_Advanced_SIMD_arch): Add description of diff --git a/binutils/readelf.c b/binutils/readelf.c index b5d766f9294..c5e9b4feb25 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -4633,11 +4633,14 @@ get_group_flags (unsigned int flags) static char buff[32]; switch (flags) { + case 0: + return ""; + case GRP_COMDAT: - return "COMDAT"; + return "COMDAT "; default: - snprintf (buff, sizeof (buff), _("[: 0x%x]"), flags); + snprintf (buff, sizeof (buff), _("[: 0x%x] "), flags); break; } return buff; @@ -4797,7 +4800,7 @@ process_section_groups (FILE * file) if (do_section_groups) { - printf ("\n%s group section [%5u] `%s' [%s] contains %u sections:\n", + printf ("\n%sgroup section [%5u] `%s' [%s] contains %u sections:\n", get_group_flags (entry), i, name, group_name, size); printf (_(" [Index] Name\n")); -- 2.30.2