summaryrefslogtreecommitdiff
path: root/bfd/format.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2005-12-13 15:34:28 +0000
committerH.J. Lu <hjl@lucon.org>2005-12-13 15:34:28 +0000
commitdb3bcf75cdd075c099029a2f61b14db378ae6874 (patch)
tree214ebb5ce9ed2f1f768819e46790ba8ff4dfd9c6 /bfd/format.c
parenta1b0c413612ac5973b826cb78b0daa6a9c10dbaf (diff)
downloadbinutils-redhat-db3bcf75cdd075c099029a2f61b14db378ae6874.tar.gz
2005-12-13 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2008 * elf.c (_bfd_elf_setup_sections): Return FALSE if elf_linked_to_section will be set to NULL. * format.c (bfd_check_format_matches): Don't check the default target twice.
Diffstat (limited to 'bfd/format.c')
-rw-r--r--bfd/format.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/format.c b/bfd/format.c
index ba9ca9f609..6a34dd2bea 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -217,7 +217,9 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
const bfd_target *temp;
bfd_error_type err;
- if (*target == &binary_vec)
+ /* Don't check the default target twice. */
+ if (*target == &binary_vec
+ || (!abfd->target_defaulted && *target == save_targ))
continue;
abfd->xvec = *target; /* Change BFD's target temporarily. */