This is the mail archive of the binutils@sources.redhat.com 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]

readelf truncates symbol names in relocation sections


Hi

readelf (binutils-2.11.90.0.31) truncates symbol names in relocation
sections to 25 characters. This makes the output quite useless.
Symbol names from other sections are printed correctly.

I have appended a patch that fixes this problem.

Julian


diff -ruN binutils-2.11.90.0.31/binutils/ChangeLog binutils-2.11.90.0.31.fixed/binutils/ChangeLog
--- binutils-2.11.90.0.31/binutils/ChangeLog	Thu Aug 30 18:30:37 2001
+++ binutils-2.11.90.0.31.fixed/binutils/ChangeLog	Tue Dec 18 12:22:00 2001
@@ -1,3 +1,8 @@
+2001-12-18  Julian v. Bock  <julian@wongr.net>
+
+	* readelf.c (dump_relocations): Don't truncate symbol names to
+	25 characters.
+
 2001-08-29  Peter Targett  <peter.targett@arccores.com>
 
 	* MAINTAINERS: Include ARC Maintainer.
diff -ruN binutils-2.11.90.0.31/binutils/readelf.c binutils-2.11.90.0.31.fixed/binutils/readelf.c
--- binutils-2.11.90.0.31/binutils/readelf.c	Mon Aug 27 20:44:51 2001
+++ binutils-2.11.90.0.31.fixed/binutils/readelf.c	Tue Dec 18 12:19:14 2001
@@ -1030,12 +1030,12 @@
 	      printf ("  ");
 
 	      if (psym->st_name == 0)
-		printf ("%-25.25s",
+		printf ("%s",
 			SECTION_NAME (section_headers + psym->st_shndx));
 	      else if (strtab == NULL)
 		printf (_("<string table index %3ld>"), psym->st_name);
 	      else
-		printf ("%-25.25s", strtab + psym->st_name);
+		printf ("%s", strtab + psym->st_name);
 
 	      if (is_rela)
 		printf (" + %lx", (unsigned long) relas [i].r_addend);


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