diff options
author | Nick Clifton <nickc@redhat.com> | 2016-12-01 15:02:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-12-01 15:02:45 +0000 |
commit | 4cbd84083ea89e870526ed0c80d462084887ba6e (patch) | |
tree | 333287b1f726afee98a22e8c5cf144c4e2e50b59 /gas/subsegs.c | |
parent | 4ee1d7e401a8c1aedfdc86aac7faa8267eab1e5c (diff) | |
download | gdb-4cbd84083ea89e870526ed0c80d462084887ba6e.zip gdb-4cbd84083ea89e870526ed0c80d462084887ba6e.tar.gz gdb-4cbd84083ea89e870526ed0c80d462084887ba6e.tar.bz2 |
Fix seg-fault printing assembler statistics when the output file was not created.
PR gas/20897
* subsegs.c (subsegs_print_statistics): Do nothing if no output
file was created.
Diffstat (limited to 'gas/subsegs.c')
-rw-r--r-- | gas/subsegs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/subsegs.c b/gas/subsegs.c index 0647653..ab0836c 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) { |