This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] readelf cuts the section names even with -W


Hi,

readelf -WS currently shows:
Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        0000000000000000 000040 000064 00  AX  0   0  4
...
  [ 7] .gnu.linkonce.d.D PROGBITS        0000000000000000 000148 000008 00  WA  0   0  8

while with the patch it shows:
Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        0000000000000000 000040 000064 00  AX  0   0  4
...
  [ 7] .gnu.linkonce.d.DW.ref.__gxx_personality_v0 PROGBITS        0000000000000000 000148 000008 00  WA  0   0  8

One can use -t|--section-details but this has otherwise inconvenient format.

No regressions in the testsuite found on x86_64-unknown-linux-gnu.


Thanks,
Jan


2008-10-06  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* readelf.c (process_section_headers): Do not cut the section names and
	types if running with -W.

--- binutils/readelf.c	17 Sep 2008 07:50:28 -0000	1.426
+++ binutils/readelf.c	6 Oct 2008 16:14:40 -0000
@@ -4375,7 +4375,8 @@ process_section_headers (FILE *file)
 		    get_section_type_name (section->sh_type));
 	}
       else
-	printf ("  [%2u] %-17.17s %-15.15s ",
+	printf ((do_wide ? "  [%2u] %-17s %-15s "
+			 : "  [%2u] %-17.17s %-15.15s "),
 		i,
 		SECTION_NAME (section),
 		get_section_type_name (section->sh_type));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]