]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ldlang.c (lang_check): Emit fatal error if relocatable link
authorHans-Peter Nilsson <hp@axis.com>
Fri, 15 Jun 2001 13:13:46 +0000 (13:13 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Fri, 15 Jun 2001 13:13:46 +0000 (13:13 +0000)
between different object flavours.

ld/ChangeLog
ld/ldlang.c

index f86b73680c2693fbd994f346026ab841b3ffb773..596ed9a06f9d84a3929b785b20a6d04fba6226bc 100644 (file)
@@ -1,5 +1,8 @@
 2001-06-15  Hans-Peter Nilsson  <hp@axis.com>
 
+       * ldlang.c (lang_check): Emit fatal error if relocatable link
+       between different object flavours.
+
        * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
        Set new link_info member export_dynamic.
        * ldmain.c (main): Initialize new link_info member export_dynamic.
index 1d338e6d8f057e8ecf35abe953f75739fd991a23..4512af6b4eaeabd4c7e2ec8e1489527c0bc69c98 100644 (file)
@@ -3520,6 +3520,11 @@ lang_check ()
                   bfd_printable_name (input_bfd), input_bfd,
                   bfd_printable_name (output_bfd));
        }
+      else if (link_info.relocateable
+              && bfd_get_flavour (input_bfd) != bfd_get_flavour (output_bfd))
+       einfo (_("%P%F: Relocatable linking from format %s (%B) to format %s (%B) is not supported"),
+              bfd_get_target (input_bfd), input_bfd,
+              bfd_get_target (output_bfd), output_bfd);
       else if (bfd_count_sections (input_bfd))
        {
          /* If the input bfd has no contents, it shouldn't set the