This is the mail archive of the 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]

RFA: tidy note columns

Right now, `readelf -n' columns don't always align nicely:

  Owner		Data size	Description
  stapsdt		0x0000002e	Unknown note type: (0x00000003)

This patch makes them tidier.  I chose this particular implementation
approach because it makes it simpler to change the column widths in the



2011-04-21  Tom Tromey  <>

	* readelf.c (process_corefile_note_segment): Change header field
	(process_note): Change field widths.

Index: readelf.c
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.540
diff -u -r1.540 readelf.c
--- readelf.c	7 Apr 2011 11:40:12 -0000	1.540
+++ readelf.c	21 Apr 2011 17:03:37 -0000
@@ -12444,7 +12444,7 @@
        note type strings.  */
     nt = get_note_type (pnote->type);
-  printf ("  %-10s\t0x%08lx\t%s\n", name, pnote->descsz, nt);
+  printf ("  %-20s 0x%08lx\t%s\n", name, pnote->descsz, nt);
   if (const_strneq (pnote->namedata, "IPF/VMS"))
     return print_ia64_vms_note (pnote);
@@ -12472,7 +12472,7 @@
   printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"),
 	  (unsigned long) offset, (unsigned long) length);
-  printf (_("  Owner\t\tData size\tDescription\n"));
+  printf (_("  %-20s %10s\tDescription\n"), _("Offset"), _("Data size"));
   while (external < (Elf_External_Note *) ((char *) pnotes + length))

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