diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-06-04 18:16:17 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-06-04 18:16:17 +0000 |
commit | 70b554c98b53a8420acb7c4117fb445ad0808396 (patch) | |
tree | 4feb192278597ca8317bb1eda9bf702cd3cdf2ab /bfd | |
parent | 1d7b4a7037cd4773bce26906e81778b5097b09c3 (diff) | |
download | fsf-binutils-gdb-70b554c98b53a8420acb7c4117fb445ad0808396.zip fsf-binutils-gdb-70b554c98b53a8420acb7c4117fb445ad0808396.tar.gz fsf-binutils-gdb-70b554c98b53a8420acb7c4117fb445ad0808396.tar.bz2 |
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')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfcode.h | 41 |
2 files changed, 25 insertions, 21 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 30b34b6..e417b82 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-06-04 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/12842 + * elfcode.h (elf_object_p): Revert the last change. + 2011-06-04 Alan Modra <amodra@gmail.com> * archures.c (bfd_arch_get_compatible): If one arch is unknown, diff --git a/bfd/elfcode.h b/bfd/elfcode.h index fdfeee9..d8833df 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) |