summaryrefslogtreecommitdiff
path: root/bfd/elfcore.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2008-08-01 12:21:28 +0000
committerAlan Modra <amodra@bigpond.net.au>2008-08-01 12:21:28 +0000
commite10a4f35c0495cf224fa51138c83b62f1b7fa7fe (patch)
tree4985f7685f0fe813d9e6f6c5d2ffda18ffb9d58c /bfd/elfcore.h
parent85ac20d14d44b9203c6b4150c25e0f8a5016af58 (diff)
downloadbinutils-redhat-e10a4f35c0495cf224fa51138c83b62f1b7fa7fe.tar.gz
* 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.
Diffstat (limited to 'bfd/elfcore.h')
-rw-r--r--bfd/elfcore.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index 9c51422624..f9d578860e 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -159,6 +159,8 @@ 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->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)