From 79299211a1a9a701f146620d419da6ee0175798c Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 8 May 2019 14:51:32 +0100 Subject: [PATCH] Do not force the m68k-elf linker to fail if it encoutners a non-ELF format file. PR 24523 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE rather than FALSE if encountering a non-ELF file. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-m68k.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f272ff848db..61b70ec8048 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-05-08 Nick Clifton + + PR 24523 + * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE + rather than FALSE if encountering a non-ELF file. + 2019-05-06 Alan Modra * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error. diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 0fe546661f5..e8d9ed5ce14 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -1132,9 +1132,11 @@ elf32_m68k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword in_isa; const bfd_arch_info_type *arch_info; - if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return FALSE; + /* PR 24523: For non-ELF files do not try to merge any private + data, but also do not prevent the link from succeeding. */ + return TRUE; /* Get the merged machine. This checks for incompatibility between Coldfire & non-Coldfire flags, incompability between different -- 2.30.2