/* IBM RS/6000 "XCOFF" back-end for BFD.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 2001-2020 Free Software Foundation, Inc.
Written by Tom Rix
Contributed by Red Hat Inc.
#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) \
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;
}
}
+ /* 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: