Fix seg fault producing histogram
authorNick Clifton <nickc@redhat.com>
Fri, 29 Jan 1999 11:57:27 +0000 (11:57 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 29 Jan 1999 11:57:27 +0000 (11:57 +0000)
binutils/ChangeLog
binutils/readelf.c

index 4247bd67e5d0b97bc3b47ba8c3ba876581696577..34f848eeda1094445500abdb98fff479a63c9ff1 100644 (file)
@@ -1,3 +1,8 @@
+1999-01-29  Nick Clifton  <nickc@cygnus.com>
+
+       * readelf.c (process_symbol_table): Do not produce a histogram of
+       bucket chains if none were found.
+
 1999-01-27  Nick Clifton  <nickc@cygnus.com>
 
        * version.c: Add 1999 copyright.
index d009be042a99cc7df9cfe4240e768a4b3d14cc89..d67f71a7be261916fe9e98d7411b8c4e6ea95ddc 100644 (file)
@@ -1053,7 +1053,7 @@ usage ()
   fprintf (stdout, _("  -x <number> or --hex-dump=<number>\n"));
   fprintf (stdout, _("                            Dump the contents of section <number>\n"));
   fprintf (stdout, _("  -w[liap] or --debug-dump[=line,=info,=abbrev,=pubnames]\n"));
-  fprintf (stdout, _("                            Display the contents of DWARF debug sections\n"));
+  fprintf (stdout, _("                            Display the contents of DWARF2 debug sections\n"));
 #ifdef SUPPORT_DISASSEMBLY
   fprintf (stdout, _("  -i <number> or --instruction-dump=<number>\n"));
   fprintf (stdout, _("                            Disassemble the contents of section <number>\n"));
@@ -3109,7 +3109,7 @@ process_symbol_table (file)
     printf
       (_("\nDynamic symbol information is not available for displaying symbols.\n"));
 
-  if (do_histogram)
+  if (do_histogram && buckets != NULL)
     {
       int *lengths;
       int *counts;