with the correct arch size before rejecting the generic fallback.
* elfcode.h (elf_object_p): Likewise. Ensure arch size matches
before accepting a target.
+2008-08-01 Alan Modra <amodra@bigpond.net.au>
+ Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * elfcore.h (elf_core_file_p): Ensure we have a backend match
+ with the correct arch size before rejecting the generic fallback.
+ * elfcode.h (elf_object_p): Likewise. Ensure arch size matches
+ before accepting a target.
+
2008-08-01 Alan Modra <amodra@bigpond.net.au>
* elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
goto got_wrong_format_error;
ebd = get_elf_backend_data (abfd);
+ if (ebd->s->arch_size != ARCH_SIZE)
+ goto got_wrong_format_error;
/* Check that the ELF e_machine field matches what this particular
BFD format expects. */
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)
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
&& i_ehdrp->e_machine == back->elf_machine_alt1)