Date: Wed, 01 Dec 2004 14:59:55 +0100
From: Orjan Friberg <orjan.friberg@axis.com>
The reason seems to be the call to bfd_default_set_arch_mach (abfd,
ebd->arch, 0) in elf_core_file_p in elfcore.h which will select the
default mach for that arch. Directly after this we start reading the
core file which results in a call to cris_elf_grok_prstatus (which
fails because the default mach doesn't match the current mach).
Without that call to bfd_default_set_arch_mach(), the
architecture/machine wouldn't be set at all for the core file BFD.
Is there an implicit assumption that the mach is not to be trusted
when reading a core file?
What do you mean by "not to be trusted"? It's simply always set to
the default machine for ELF core files. For most architectures this
is what makes the most sense anyway. Setting it to anything different
from the default would involve some architecture-dependent code. I