Do not force the m68k-elf linker to fail if it encoutners a non-ELF format file.
authorNick Clifton <nickc@redhat.com>
Wed, 8 May 2019 13:51:32 +0000 (14:51 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 8 May 2019 13:51:32 +0000 (14:51 +0100)
PR 24523
* elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
rather than FALSE if encountering a non-ELF file.

bfd/ChangeLog
bfd/elf32-m68k.c

index f272ff848db027455365ecf43eece6f3f8afb107..61b70ec804852bc6285db27bb9e730c90151466d 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-08  Nick Clifton  <nickc@redhat.com>
+
+       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  <amodra@gmail.com>
 
        * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
index 0fe546661f5a12e85fcd43507b20294cb059f007..e8d9ed5ce1451e5b541891a7d11bc8dfa1d94f31 100644 (file)
@@ -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
This page took 0.027348 seconds and 4 git commands to generate.