Add missing newlines in readelf -n output
authorAndreas Schwab <schwab@suse.de>
Tue, 11 Jul 2017 15:36:35 +0000 (17:36 +0200)
committerAndreas Schwab <schwab@suse.de>
Tue, 11 Jul 2017 15:40:24 +0000 (17:40 +0200)
* readelf.c (process_note): Print newline after description data
in narrow mode.
(print_core_note): Print newline if nothing was printed in wide
mode.

binutils/ChangeLog
binutils/readelf.c

index 8c12a495c55677962110b8f3240574567dad6d9d..254be5e59ce284add325e809afaf41f3392b6500 100644 (file)
@@ -1,3 +1,10 @@
+2017-07-11  Andreas Schwab  <schwab@suse.de>
+
+       * readelf.c (process_note): Print newline after description data
+       in narrow mode.
+       (print_core_note): Print newline if nothing was printed in wide
+       mode.
+
 2017-07-09  Rafael Fontenelle <rafaelff@gnome.org>
 
        * dwarf.c (display_formatted_table): Fix error message typo.
 2017-07-09  Rafael Fontenelle <rafaelff@gnome.org>
 
        * dwarf.c (display_formatted_table): Fix error message typo.
index c9c11a3993967fd0474838cfa25c9f4d609f4b81..362c204bcbce0f5d73ccb4ef56ff02c1712ad4fa 100644 (file)
@@ -16217,7 +16217,11 @@ print_core_note (Elf_Internal_Note *pnote)
   unsigned char *descdata, *filenames, *descend;
 
   if (pnote->type != NT_FILE)
   unsigned char *descdata, *filenames, *descend;
 
   if (pnote->type != NT_FILE)
-    return TRUE;
+    {
+      if (do_wide)
+       printf ("\n");
+      return TRUE;
+    }
 
 #ifndef BFD64
   if (!is_32bit_elf)
 
 #ifndef BFD64
   if (!is_32bit_elf)
@@ -17497,6 +17501,8 @@ process_note (Elf_Internal_Note *  pnote,
       printf (_("   description data: "));
       for (i = 0; i < pnote->descsz; i++)
        printf ("%02x ", pnote->descdata[i]);
       printf (_("   description data: "));
       for (i = 0; i < pnote->descsz; i++)
        printf ("%02x ", pnote->descdata[i]);
+      if (!do_wide)
+       printf ("\n");
     }
 
   if (do_wide)
     }
 
   if (do_wide)
This page took 0.030931 seconds and 4 git commands to generate.