Blob Blame History Raw
2008-07-29  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Recognize elf64-i386 at least as elf64-little.
	* elfcore.h (elf_core_file_p): Exclusion of existing arches for the
	generic arch fallback now matches also the arch size.

--- bfd/elfcore.h	10 May 2008 01:58:17 -0000	1.27
+++ bfd/elfcore.h	29 Jul 2008 18:25:07 -0000
@@ -159,11 +159,12 @@ elf_core_file_p (bfd *abfd)
 	  if ((*target_ptr)->flavour != bfd_target_elf_flavour)
 	    continue;
 	  back = xvec_get_elf_backend_data (*target_ptr);
-	  if (back->elf_machine_code == i_ehdrp->e_machine
-	      || (back->elf_machine_alt1 != 0
-	          && i_ehdrp->e_machine == back->elf_machine_alt1)
-	      || (back->elf_machine_alt2 != 0
-	          && i_ehdrp->e_machine == back->elf_machine_alt2))
+	  if (ARCH_SIZE == back->s->arch_size
+	      && (back->elf_machine_code == i_ehdrp->e_machine
+		  || (back->elf_machine_alt1 != 0
+		      && i_ehdrp->e_machine == back->elf_machine_alt1)
+		  || (back->elf_machine_alt2 != 0
+		      && i_ehdrp->e_machine == back->elf_machine_alt2)))
 	    {
 	      /* target_ptr is an ELF backend which matches this
 		 object file, so reject the generic ELF target.  */