aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 1d338e6..4512af6 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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