diff --git a/gas/ChangeLog b/gas/ChangeLog index 385ff56c0ed..76c23ce70ca 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2016-12-01 Nick Clifton + PR gas/20897 + * subsegs.c (subsegs_print_statistics): Do nothing if no output + file was created. + PR gas/20895 * symbols.c (resolve_symbol_value): Gracefully handle erroneous symbolic expressions. diff --git a/gas/subsegs.c b/gas/subsegs.c index 0647653f878..ab0836c2278 100644 --- a/gas/subsegs.c +++ b/gas/subsegs.c @@ -297,6 +297,10 @@ subsegs_print_statistics (FILE *file) frchainS *frchp; asection *s; + /* PR 20897 - check to see if the output bfd was actually created. */ + if (stdoutput == NULL) + return; + fprintf (file, "frag chains:\n"); for (s = stdoutput->sections; s; s = s->next) {