aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-08-25 13:20:41 +0000
committerAlan Modra <amodra@gmail.com>2007-08-25 13:20:41 +0000
commitb15fa79e3ab3598d2a985fdc24d3fe68700b85a9 (patch)
treed35162173cb0c28bd6629572ce7c11bdf8152200 /binutils
parent043b877a95014ccb8ee27733dc1ced0d25531ae4 (diff)
downloadfsf-binutils-gdb-b15fa79e3ab3598d2a985fdc24d3fe68700b85a9.zip
fsf-binutils-gdb-b15fa79e3ab3598d2a985fdc24d3fe68700b85a9.tar.gz
fsf-binutils-gdb-b15fa79e3ab3598d2a985fdc24d3fe68700b85a9.tar.bz2
include/elf/
* common.h (NT_SPU): Define. bfd/ * elf.c (elfcore_grok_spu_note): New function. (elf_parse_notes): Call it. binutils/ * readelf.c (process_note): Recognize SPU core file notes.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c12
2 files changed, 13 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index d0fc861..04a3194 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-25 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * readelf.c (process_note): Recognize SPU core file notes.
+
2007-08-24 Daniel Jacobowitz <dan@codesourcery.com>
* configure.in: Install embedspu on powerpc*-*-eabi* also.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 7e30584..9fc8e0c 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -9231,6 +9231,7 @@ get_netbsd_elfcore_note_type (unsigned e_type)
static int
process_note (Elf_Internal_Note *pnote)
{
+ const char *name = pnote->namesz ? pnote->namedata : "(NONE)";
const char *nt;
if (pnote->namesz == 0)
@@ -9246,14 +9247,19 @@ process_note (Elf_Internal_Note *pnote)
/* NetBSD-specific core file notes. */
nt = get_netbsd_elfcore_note_type (pnote->type);
+ else if (strneq (pnote->namedata, "SPU/", 4))
+ {
+ /* SPU-specific core file notes. */
+ nt = pnote->namedata + 4;
+ name = "SPU";
+ }
+
else
/* Don't recognize this note name; just use the default set of
note type strings. */
nt = get_note_type (pnote->type);
- printf (" %s\t\t0x%08lx\t%s\n",
- pnote->namesz ? pnote->namedata : "(NONE)",
- pnote->descsz, nt);
+ printf (" %s\t\t0x%08lx\t%s\n", name, pnote->descsz, nt);
return 1;
}