From bc70a333d468eb0b89f42fd8432c68606efc0f19 Mon Sep 17 00:00:00 2001 From: Gunther Nikl Date: Tue, 25 Nov 2008 20:36:29 +0000 Subject: [PATCH] (amiga_handle_rest): Tolerate a missing HUNK_END. Apparently the AmigaDOS loader accepts such files which are created by broken crunchers. --- bfd/amigaos.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bfd/amigaos.c b/bfd/amigaos.c index 545900f..69c185e 100644 --- a/bfd/amigaos.c +++ b/bfd/amigaos.c @@ -1174,6 +1174,12 @@ amiga_handle_rest (abfd, current_section, isload) break; default: /* error */ + bfd_seek (abfd, -4, SEEK_CUR); + bfd_msg ("missing HUNK_END: unexpected hunktype %ld(0x%lx) at offset 0x%lx", + hunk_type, hunk_type, bfd_tell (abfd)); + hunk_type = HUNK_VALUE(hunk_type); + if (hunk_type == HUNK_CODE || hunk_type == HUNK_DATA || hunk_type == HUNK_BSS) + return TRUE; bfd_set_error (bfd_error_wrong_format); return FALSE; break;