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]

Re: RFC: Displaying multibyte symbol names in readelf


Hi Alan,

Uh, the reason I quoted part of your readelf patch was that I think
it's wrong to trim readelf -W output.

You are right, -W should display the full section type name. I was getting confused with the way that the old code was printing out the names.


I have applied this patch to fix readelf and revert my changes to the tic6x linker tests.

Cheers
  Nick

binutils/ChangeLog
2012-05-30  Nick Clifton  <nickc@redhat.com>

	* readelf.c (process_section_headers): Correct bug in previous
	delta - display full section type in wide mode.

ld/testsuite/ChangeLog
2012-05-30  Nick Clifton  <nickc@redhat.com>

	* ld-tic6x/shlib-1b.rd: Revert previous delta.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-1.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.


Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.574
diff -u -3 -p -r1.574 readelf.c
--- binutils/readelf.c	28 May 2012 14:20:16 -0000	1.574
+++ binutils/readelf.c	30 May 2012 14:27:44 -0000
@@ -4738,18 +4738,16 @@ process_section_headers (FILE * file)
       if (do_section_details)
 	{
 	  print_symbol (INT_MAX, SECTION_NAME (section));
-	  putchar ('\n');
-	  if (is_32bit_elf || do_wide)
-	    printf ("       %-15.15s ",
-		    get_section_type_name (section->sh_type));
+	  printf ("\n      ");
 	}
       else
 	{
 	  print_symbol (-17, SECTION_NAME (section));
-	  printf (" %-15.15s ",
-		  get_section_type_name (section->sh_type));
 	}
-
+      
+      printf (do_wide ? " %-15s " : " %-15.15s ",
+	      get_section_type_name (section->sh_type));
+      
       if (is_32bit_elf)
 	{
 	  const char * link_too_big = NULL;
Index: ld/testsuite/ld-tic6x/shlib-1.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-1.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-1.rd
--- ld/testsuite/ld-tic6x/shlib-1.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-1.rd	30 May 2012 14:27:49 -0000
@@ -15,7 +15,7 @@ Section Headers:
   \[10\] \.got              PROGBITS        10000100 002100 000028 00  WA  0   0  4
   \[11\] \.neardata         PROGBITS        10000128 002128 000008 00  WA  0   0  4
   \[12\] \.bss              NOBITS          10000130 002130 000004 00  WA  0   0  4
-  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 002130 000019 00      0   0  1
+  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00      0   0  1
   \[14\] \.shstrtab         STRTAB          00000000 002149 00007b 00      0   0  1
   \[15\] \.symtab           SYMTAB          00000000 00246c 0001a0 10     16  19  4
   \[16\] \.strtab           STRTAB          00000000 00260c 000059 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-1b.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-1b.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-1b.rd
--- ld/testsuite/ld-tic6x/shlib-1b.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-1b.rd	30 May 2012 14:27:49 -0000
@@ -15,7 +15,7 @@ Section Headers:
   \[10\] \.got              PROGBITS        10000100 002100 000028 00  WA  0   0  4
   \[11\] \.neardata         PROGBITS        10000128 002128 000008 00  WA  0   0  4
   \[12\] \.bss              NOBITS          10000130 002130 000004 00  WA  0   0  4
-  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 002130 000019 00      0   0  1
+  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00      0   0  1
   \[14\] \.shstrtab         STRTAB          00000000 002149 00007b 00      0   0  1
   \[15\] \.symtab           SYMTAB          00000000 00246c 0001a0 10     16  19  4
   \[16\] \.strtab           STRTAB          00000000 00260c 000059 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-1r.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-1r.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-1r.rd
--- ld/testsuite/ld-tic6x/shlib-1r.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-1r.rd	30 May 2012 14:27:49 -0000
@@ -15,7 +15,7 @@ Section Headers:
   \[10\] \.got              PROGBITS        10000100 002100 000028 00  WA  0   0  4
   \[11\] \.neardata         PROGBITS        10000128 002128 000008 00  WA  0   0  4
   \[12\] \.bss              NOBITS          10000130 002130 000004 00  WA  0   0  4
-  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 002130 000019 00      0   0  1
+  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00      0   0  1
   \[14\] \.shstrtab         STRTAB          00000000 002149 00007b 00      0   0  1
   \[15\] \.symtab           SYMTAB          00000000 00246c 0001a0 10     16  19  4
   \[16\] \.strtab           STRTAB          00000000 00260c 000059 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-1rb.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-1rb.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-1rb.rd
--- ld/testsuite/ld-tic6x/shlib-1rb.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-1rb.rd	30 May 2012 14:27:49 -0000
@@ -15,7 +15,7 @@ Section Headers:
   \[10\] \.got              PROGBITS        10000100 002100 000028 00  WA  0   0  4
   \[11\] \.neardata         PROGBITS        10000128 002128 000008 00  WA  0   0  4
   \[12\] \.bss              NOBITS          10000130 002130 000004 00  WA  0   0  4
-  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 002130 000019 00      0   0  1
+  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00      0   0  1
   \[14\] \.shstrtab         STRTAB          00000000 002149 00007b 00      0   0  1
   \[15\] \.symtab           SYMTAB          00000000 00246c 0001a0 10     16  19  4
   \[16\] \.strtab           STRTAB          00000000 00260c 000059 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-app-1.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-app-1.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-app-1.rd
--- ld/testsuite/ld-tic6x/shlib-app-1.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-app-1.rd	30 May 2012 14:27:49 -0000
@@ -16,7 +16,7 @@ Section Headers:
   \[11\] \.got              PROGBITS        100000a0 0020a0 000020 00  WA  0   0  4
   \[12\] \.neardata         PROGBITS        100000c0 0020c0 00000c 00  WA  0   0  4
   \[13\] \.bss              NOBITS          100000cc 0020cc 000004 00  WA  0   0  4
-  \[14\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020cc 000019 00      0   0  1
+  \[14\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020cc 000019 00      0   0  1
   \[15\] \.shstrtab         STRTAB          00000000 0020e5 000080 00      0   0  1
   \[16\] \.symtab           SYMTAB          00000000 002438 0001a0 10     17  20  4
   \[17\] \.strtab           STRTAB          00000000 0025d8 000055 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-app-1b.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-app-1b.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-app-1b.rd
--- ld/testsuite/ld-tic6x/shlib-app-1b.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-app-1b.rd	30 May 2012 14:27:49 -0000
@@ -16,7 +16,7 @@ Section Headers:
   \[11\] \.got              PROGBITS        100000a0 0020a0 000020 00  WA  0   0  4
   \[12\] \.neardata         PROGBITS        100000c0 0020c0 00000c 00  WA  0   0  4
   \[13\] \.bss              NOBITS          100000cc 0020cc 000004 00  WA  0   0  4
-  \[14\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020cc 000019 00      0   0  1
+  \[14\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020cc 000019 00      0   0  1
   \[15\] \.shstrtab         STRTAB          00000000 0020e5 000080 00      0   0  1
   \[16\] \.symtab           SYMTAB          00000000 002438 0001a0 10     17  20  4
   \[17\] \.strtab           STRTAB          00000000 0025d8 000055 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-app-1r.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-app-1r.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-app-1r.rd
--- ld/testsuite/ld-tic6x/shlib-app-1r.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-app-1r.rd	30 May 2012 14:27:49 -0000
@@ -15,7 +15,7 @@ Section Headers:
   \[10\] \.got              PROGBITS        100000a0 0020a0 000020 00  WA  0   0  4
   \[11\] \.neardata         PROGBITS        100000c0 0020c0 000004 00  WA  0   0  4
   \[12\] \.bss              NOBITS          100000c4 0020c4 000004 00  WA  0   0  4
-  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020c4 000019 00      0   0  1
+  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020c4 000019 00      0   0  1
   \[14\] \.shstrtab         STRTAB          00000000 0020dd 00007b 00      0   0  1
   \[15\] \.symtab           SYMTAB          00000000 002400 000160 10     16  18  4
   \[16\] \.strtab           STRTAB          00000000 002560 00004d 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-app-1rb.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-app-1rb.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-app-1rb.rd
--- ld/testsuite/ld-tic6x/shlib-app-1rb.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-app-1rb.rd	30 May 2012 14:27:49 -0000
@@ -15,7 +15,7 @@ Section Headers:
   \[10\] \.got              PROGBITS        100000a0 0020a0 000020 00  WA  0   0  4
   \[11\] \.neardata         PROGBITS        100000c0 0020c0 000004 00  WA  0   0  4
   \[12\] \.bss              NOBITS          100000c4 0020c4 000004 00  WA  0   0  4
-  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020c4 000019 00      0   0  1
+  \[13\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020c4 000019 00      0   0  1
   \[14\] \.shstrtab         STRTAB          00000000 0020dd 00007b 00      0   0  1
   \[15\] \.symtab           SYMTAB          00000000 002400 000160 10     16  18  4
   \[16\] \.strtab           STRTAB          00000000 002560 00004d 00      0   0  1
Index: ld/testsuite/ld-tic6x/shlib-noindex.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/shlib-noindex.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 shlib-noindex.rd
--- ld/testsuite/ld-tic6x/shlib-noindex.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/shlib-noindex.rd	30 May 2012 14:27:49 -0000
@@ -16,7 +16,7 @@ Section Headers:
   \[11\] \.got              PROGBITS        10000100 002100 000028 00  WA  0   0  4
   \[12\] \.neardata         PROGBITS        10000128 002128 000008 00  WA  0   0  4
   \[13\] \.bss              NOBITS          10000130 002130 000004 00  WA  0   0  4
-  \[14\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 002130 000019 00      0   0  1
+  \[14\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 002130 000019 00      0   0  1
   \[15\] \.shstrtab         STRTAB          00000000 002149 000080 00      0   0  1
   \[16\] \.symtab           SYMTAB          00000000 00249c 0001b0 10     17  20  4
   \[17\] \.strtab           STRTAB          00000000 00264c 000059 00      0   0  1
Index: ld/testsuite/ld-tic6x/static-app-1.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/static-app-1.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 static-app-1.rd
--- ld/testsuite/ld-tic6x/static-app-1.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/static-app-1.rd	30 May 2012 14:27:49 -0000
@@ -13,7 +13,7 @@ Section Headers:
   \[ 8\] \.got              PROGBITS        100000c0 0020c0 000020 00  WA  0   0  4
   \[ 9\] \.neardata         PROGBITS        100000e0 0020e0 000014 00  WA  0   0  4
   \[10\] \.bss              NOBITS          100000f4 0020f4 000004 00  WA  0   0  4
-  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020f4 000019 00      0   0  1
+  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020f4 000019 00      0   0  1
   \[12\] \.shstrtab         STRTAB          00000000 00210d 000071 00      0   0  1
   \[13\] \.symtab           SYMTAB          00000000 0023d8 0001a0 10     14  19  4
   \[14\] \.strtab           STRTAB          00000000 002578 000060 00      0   0  1
Index: ld/testsuite/ld-tic6x/static-app-1b.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/static-app-1b.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 static-app-1b.rd
--- ld/testsuite/ld-tic6x/static-app-1b.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/static-app-1b.rd	30 May 2012 14:27:49 -0000
@@ -13,7 +13,7 @@ Section Headers:
   \[ 8\] \.got              PROGBITS        100000c0 0020c0 000020 00  WA  0   0  4
   \[ 9\] \.neardata         PROGBITS        100000e0 0020e0 000014 00  WA  0   0  4
   \[10\] \.bss              NOBITS          100000f4 0020f4 000004 00  WA  0   0  4
-  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020f4 000019 00      0   0  1
+  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020f4 000019 00      0   0  1
   \[12\] \.shstrtab         STRTAB          00000000 00210d 000071 00      0   0  1
   \[13\] \.symtab           SYMTAB          00000000 0023d8 0001a0 10     14  19  4
   \[14\] \.strtab           STRTAB          00000000 002578 000060 00      0   0  1
Index: ld/testsuite/ld-tic6x/static-app-1r.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/static-app-1r.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 static-app-1r.rd
--- ld/testsuite/ld-tic6x/static-app-1r.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/static-app-1r.rd	30 May 2012 14:27:49 -0000
@@ -13,7 +13,7 @@ Section Headers:
   \[ 8\] \.got              PROGBITS        100000c0 0020c0 000020 00  WA  0   0  4
   \[ 9\] \.neardata         PROGBITS        100000e0 0020e0 00000c 00  WA  0   0  4
   \[10\] \.bss              NOBITS          100000ec 0020ec 000004 00  WA  0   0  4
-  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020ec 000019 00      0   0  1
+  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020ec 000019 00      0   0  1
   \[12\] \.shstrtab         STRTAB          00000000 002105 000071 00      0   0  1
   \[13\] \.symtab           SYMTAB          00000000 0023d0 000190 10     14  18  4
   \[14\] \.strtab           STRTAB          00000000 002560 00005e 00      0   0  1
Index: ld/testsuite/ld-tic6x/static-app-1rb.rd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-tic6x/static-app-1rb.rd,v
retrieving revision 1.2
diff -u -3 -p -r1.2 static-app-1rb.rd
--- ld/testsuite/ld-tic6x/static-app-1rb.rd	29 May 2012 15:48:18 -0000	1.2
+++ ld/testsuite/ld-tic6x/static-app-1rb.rd	30 May 2012 14:27:49 -0000
@@ -13,7 +13,7 @@ Section Headers:
   \[ 8\] \.got              PROGBITS        100000c0 0020c0 000020 00  WA  0   0  4
   \[ 9\] \.neardata         PROGBITS        100000e0 0020e0 00000c 00  WA  0   0  4
   \[10\] \.bss              NOBITS          100000ec 0020ec 000004 00  WA  0   0  4
-  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTE 00000000 0020ec 000019 00      0   0  1
+  \[11\] \.c6xabi\.attributes C6000_ATTRIBUTES 00000000 0020ec 000019 00      0   0  1
   \[12\] \.shstrtab         STRTAB          00000000 002105 000071 00      0   0  1
   \[13\] \.symtab           SYMTAB          00000000 0023d0 000190 10     14  18  4
   \[14\] \.strtab           STRTAB          00000000 002560 00005e 00      0   0  1

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