diff options
author | Nick Clifton <nickc@redhat.com> | 2017-07-18 15:46:13 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-07-18 15:46:13 +0100 |
commit | e4e21d9ed14c74304bc060a9d892c0edfc4c8ab4 (patch) | |
tree | 45f7df633ed60c519d1733275115ee7bd2c8ee24 /bfd/coffcode.h | |
parent | 27841e762c975f6b1ffa0adbffc22405241262df (diff) | |
download | binutils-gdb-e4e21d9ed14c74304bc060a9d892c0edfc4c8ab4.tar.gz |
Fix runtime failure triggered by a corrupt ecoff input file.
PR binutils/21781
* coffcode.h (handle_COMDAT): Replace abort with an error message
and return.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 898327b3288..21308de8c31 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -997,7 +997,13 @@ handle_COMDAT (bfd * abfd, || isym.n_sclass == C_EXT) && BTYPE (isym.n_type) == T_NULL && isym.n_value == 0)) - abort (); + { + /* Malformed input files can trigger this test. + cf PR 21781. */ + _bfd_error_handler (_("%B: error: unexpected symbol '%s' in COMDAT section"), + abfd, symname); + goto breakloop; + } /* FIXME LATER: MSVC generates section names like .text for comdats. Gas generates |