From 4a8309436d6f3a14be3dcc46e6fead5c4de73bc8 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 18 Apr 2008 09:22:24 +0000 Subject: * 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. --- bfd/aix5ppc-core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bfd/aix5ppc-core.c') diff --git a/bfd/aix5ppc-core.c b/bfd/aix5ppc-core.c index 2b6fd674f7b..7b0695aafc1 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 #include +/* 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: -- cgit v1.2.1