readelf: Don't print section type twice for --section-details

Message ID e7efd4a5dbc4528505bd1369697f791c19373ace.1531325591.git.francois.theron@netronome.com
State New
Headers show
Series
  • readelf: Don't print section type twice for --section-details
Related show

Commit Message

Francois H. Theron July 11, 2018, 4:14 p.m.
Signed-off-by: Francois H. Theron <francois.theron@netronome.com>

---
 binutils/ChangeLog | 4 ++++
 binutils/readelf.c | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.17.0

Comments

Alan Modra July 12, 2018, 6:15 a.m. | #1
On Wed, Jul 11, 2018 at 06:14:16PM +0200, Francois H. Theron wrote:
> --- a/binutils/readelf.c

> +++ b/binutils/readelf.c

> @@ -6508,8 +6508,7 @@ process_section_headers (Filedata * filedata)

>  	}

>        else if (do_section_details)

>  	{

> -	  printf ("       %-15.15s  ",

> -		  get_section_type_name (filedata, section->sh_type));

> +	  putchar (' ');

>  	  print_vma (section->sh_addr, LONG_HEX);

>  	  if ((long) section->sh_offset == section->sh_offset)

>  	    printf ("  %16.16lx", (unsigned long) section->sh_offset);


Thanks, applied.

-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index a2c71eb74b..a5897fc0c9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@ 
+2018-07-11  Francois H. Theron  <francois.theron@netronome.com>
+
+	* readelf.c: Don't print section type twice for --section-details
+
 2018-07-10  Alan Modra  <amodra@gmail.com>
 
 	* testsuite/lib/binutils-common.exp (supports_gnu_unique): Return
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 88fb356cd8..7716381d81 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -6508,8 +6508,7 @@  process_section_headers (Filedata * filedata)
 	}
       else if (do_section_details)
 	{
-	  printf ("       %-15.15s  ",
-		  get_section_type_name (filedata, section->sh_type));
+	  putchar (' ');
 	  print_vma (section->sh_addr, LONG_HEX);
 	  if ((long) section->sh_offset == section->sh_offset)
 	    printf ("  %16.16lx", (unsigned long) section->sh_offset);