summaryrefslogtreecommitdiff
path: root/bfd/aix5ppc-core.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-04-18 09:22:24 +0000
committerNick Clifton <nickc@redhat.com>2008-04-18 09:22:24 +0000
commit9acd8d5fdcf0f6dfa15120bcb0018a5292b91d8e (patch)
tree456e974f724cb562baba7b34f96ea33a2c0f568f /bfd/aix5ppc-core.c
parentbed24c649f6cac1cf7aa462c8c634c251567f933 (diff)
downloadbinutils-redhat-9acd8d5fdcf0f6dfa15120bcb0018a5292b91d8e.tar.gz
* aix5ppc-core.c: Define macros for the default architecture and
machine for matching core files. (xcoff64_core_p): Set the architecture and machine to the default values defined in the macros mentioned above. * rs6000-core.c: Define macros to determine whether or not the core file header uses the core_dumpxx header format. (rs6000coff_core_p): Don't match core files that use the core_dumpxx header format.
Diffstat (limited to 'bfd/aix5ppc-core.c')
-rw-r--r--bfd/aix5ppc-core.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/bfd/aix5ppc-core.c b/bfd/aix5ppc-core.c
index 2b6fd674f7..7b0695aafc 100644
--- a/bfd/aix5ppc-core.c
+++ b/bfd/aix5ppc-core.c
@@ -1,5 +1,5 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Written by Tom Rix
Contributed by Red Hat Inc.
@@ -40,6 +40,10 @@ int xcoff64_core_file_failing_signal (bfd *);
#include <sys/ldr.h>
#include <core.h>
+/* The default architecture and machine for matching core files. */
+#define DEFAULT_ARCHITECTURE bfd_arch_powerpc
+#define DEFAULT_MACHINE bfd_mach_ppc_620
+
#define core_hdr(abfd) ((struct core_dumpxx *) abfd->tdata.any)
#define CHECK_FILE_OFFSET(s, v) \
@@ -48,6 +52,8 @@ int xcoff64_core_file_failing_signal (bfd *);
const bfd_target *
xcoff64_core_p (bfd *abfd)
{
+ enum bfd_architecture arch;
+ unsigned long mach;
struct core_dumpxx core, *new_core_hdr;
struct stat statbuf;
asection *sec;
@@ -218,6 +224,11 @@ xcoff64_core_p (bfd *abfd)
}
}
+ /* Set the architecture and machine. */
+ arch = DEFAULT_ARCHITECTURE;
+ mach = DEFAULT_MACHINE;
+ bfd_default_set_arch_mach (abfd, arch, mach);
+
return_value = (bfd_target *) abfd->xvec; /* This is garbage for now. */
xcoff64_core_p_error: