summaryrefslogtreecommitdiff
path: root/ld/ldfile.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-12-23 10:45:03 +0000
committerNick Clifton <nickc@redhat.com>2002-12-23 10:45:03 +0000
commit5e1dfb82ac05215710dba49688e8e8342afc43cb (patch)
treed598721b99b88af416fe8c461f0daf6746b6524f /ld/ldfile.c
parented2d2a7095353be42d71901372225e3d9112cd94 (diff)
downloadbinutils-redhat-5e1dfb82ac05215710dba49688e8e8342afc43cb.tar.gz
Change linker's default behaviour - it will now reject binary files whoes
architecture it does not recognise, unless it has explicitly told to accept them.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r--ld/ldfile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c
index 34a25fa7b5..b30fbe2576 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -225,8 +225,9 @@ ldfile_try_open_bfd (attempt, entry)
return TRUE;
}
- if ((bfd_arch_get_compatible (check, output_bfd) == NULL)
- /* XCOFF archives can have 32 and 64 bit objects */
+ if ((bfd_arch_get_compatible (check, output_bfd,
+ command_line.accept_unknown_input_arch) == NULL)
+ /* XCOFF archives can have 32 and 64 bit objects. */
&& ! (bfd_get_flavour (check) == bfd_target_xcoff_flavour
&& bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
&& bfd_check_format (entry->the_bfd, bfd_archive)))