PR25648, objcopy SIGSEGV in ihex_write_record
authorAlan Modra <amodra@gmail.com>
Tue, 10 Mar 2020 00:16:17 +0000 (10:46 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 10 Mar 2020 00:35:07 +0000 (11:05 +1030)
commit6b5e16ffd3e8886fa3fb90d63e3200fcc373848e
tree37607be13de9a44bbaabf29c15e9668bca45a4d2
parent384f368958f2a5bb083660e58e5f8a010e6ad429
PR25648, objcopy SIGSEGV in ihex_write_record

ihex_set_section_contents sorts records stored on the tdata.ihex_data
list by address, but ihex_write_object_contents went too far in
assuming they were not overlapping.  This patch fixes the problem by
not assuming anything about addresses in ihex_write_object_contents.

PR 25648
* ihex.c (ihex_write_object_contents): Don't assume ordering of
addresses here.  Remove dead code.
bfd/ChangeLog
bfd/ihex.c