summaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-06-04 18:16:16 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-06-04 18:16:16 +0000
commit5083b6d5a0836f93147c770fa249d3c6cc14afca (patch)
tree2a10732b038b6ed4490bcee8350249a5819d9463 /bfd/elfcode.h
parent72578de7c541848f67f5a992d22509b7418ac130 (diff)
downloadbinutils-redhat-5083b6d5a0836f93147c770fa249d3c6cc14afca.tar.gz
Revert the last change on elf_object_p.
2011-06-04 H.J. Lu <hongjiu.lu@intel.com> PR ld/12842 * elfcode.h (elf_object_p): Revert the last change.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index fdfeee9b27..d8833dfdcf 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -595,27 +595,26 @@ elf_object_p (bfd *abfd)
/* This is the generic ELF target. Let it match any ELF target
for which we do not have a specific backend. */
- if (abfd->target_defaulted)
- for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
- {
- const struct elf_backend_data *back;
-
- if ((*target_ptr)->flavour != bfd_target_elf_flavour)
- continue;
- back = xvec_get_elf_backend_data (*target_ptr);
- if (back->s->arch_size != ARCH_SIZE)
- continue;
- if (back->elf_machine_code == i_ehdrp->e_machine
- || (back->elf_machine_alt1 != 0
- && back->elf_machine_alt1 == i_ehdrp->e_machine)
- || (back->elf_machine_alt2 != 0
- && back->elf_machine_alt2 == i_ehdrp->e_machine))
- {
- /* target_ptr is an ELF backend which matches this
- object file, so reject the generic ELF target. */
- goto got_wrong_format_error;
- }
- }
+ for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
+ {
+ const struct elf_backend_data *back;
+
+ if ((*target_ptr)->flavour != bfd_target_elf_flavour)
+ continue;
+ back = xvec_get_elf_backend_data (*target_ptr);
+ if (back->s->arch_size != ARCH_SIZE)
+ continue;
+ if (back->elf_machine_code == i_ehdrp->e_machine
+ || (back->elf_machine_alt1 != 0
+ && back->elf_machine_alt1 == i_ehdrp->e_machine)
+ || (back->elf_machine_alt2 != 0
+ && back->elf_machine_alt2 == i_ehdrp->e_machine))
+ {
+ /* target_ptr is an ELF backend which matches this
+ object file, so reject the generic ELF target. */
+ goto got_wrong_format_error;
+ }
+ }
}
if (i_ehdrp->e_type == ET_EXEC)