summaryrefslogtreecommitdiff
path: root/bfd/rs6000-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/rs6000-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/rs6000-core.c')
-rw-r--r--bfd/rs6000-core.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/bfd/rs6000-core.c b/bfd/rs6000-core.c
index eb0eb52278..ad7bef9e10 100644
--- a/bfd/rs6000-core.c
+++ b/bfd/rs6000-core.c
@@ -1,6 +1,6 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2004, 2006, 2007
+ 2001, 2002, 2004, 2006, 2007, 2008
Free Software Foundation, Inc.
Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
Archive support from Damon A. Permezel.
@@ -136,6 +136,19 @@ typedef union {
# define CORE_NEW(c) 0
#endif
+/* Return whether CoreHdr C usese core_dumpxx structure.
+
+ FIXME: the core file format version number used here definitely indicates
+ that struct core_dumpxx should be used to represent the core file header,
+ but that may not be the only such format version number. */
+
+#ifdef AIX_5_CORE
+# define CORE_DUMPXX_VERSION 267312562
+# define CNEW_IS_CORE_DUMPXX(c) ((c).new.c_version == CORE_DUMPXX_VERSION)
+#else
+# define CNEW_IS_CORE_DUMPXX(c) 0
+#endif
+
/* Return the c_stackorg field from struct core_dumpx C. */
#ifdef AIX_CORE_DUMPX_CORE
@@ -329,6 +342,13 @@ rs6000coff_core_p (bfd *abfd)
return NULL;
}
+ /* This isn't the right handler for 64-bit core files on AIX 5.x. */
+ if (CORE_NEW (core) && CNEW_IS_CORE_DUMPXX (core))
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+
/* Copy fields from new or old core structure. */
if (CORE_NEW (core))
{