aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2008-07-21 05:33:37 +0000
committerLuis Machado <luisgpm@br.ibm.com>2008-07-21 05:33:37 +0000
commit89eeb0bc236bdd010f7d3796d4d1e1459a41d196 (patch)
treeefe3041ffe78223bc48b44175bfb3e4695e7b24c /bfd
parenta366c65aeb84ae95691378b12690dea99ef94513 (diff)
downloadfsf-binutils-gdb-89eeb0bc236bdd010f7d3796d4d1e1459a41d196.zip
fsf-binutils-gdb-89eeb0bc236bdd010f7d3796d4d1e1459a41d196.tar.gz
fsf-binutils-gdb-89eeb0bc236bdd010f7d3796d4d1e1459a41d196.tar.bz2
* bfd/elf-bfd.h: Declare elfcore_write_ppc_vsx.
* bfd/elf.c (elfcore_grok_ppc_vsx): New function. (elfcore_write_ppc_vsx): New function (elfcore_grok_note): Handle VSX notes. (elfcore_write_register_note): Handle VSX notes. * include/elf/common.h: Define NT_PPC_VSX. * binutils/readelf.c (get_note_type): Handle VSX notes.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf-bfd.h2
-rw-r--r--bfd/elf.c26
3 files changed, 36 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fd30fd3..429beb4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-21 Luis Machado <luisgpm@br.ibm.com>
+
+ * elf-bfd.h: Declare elfcore_write_ppc_vsx.
+ * elf.c (elfcore_grok_ppc_vsx): New function.
+ (elfcore_write_ppc_vsx): New function
+ (elfcore_grok_note): Handle VSX notes.
+ (elfcore_write_register_note): Handle VSX notes.
+
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 81639ab..2d59ea4 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2141,6 +2141,8 @@ extern char *elfcore_write_prxfpreg
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_ppc_vmx
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_ppc_vsx
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_lwpstatus
(bfd *, char *, int *, long, int, const void *);
extern char *elfcore_write_register_note
diff --git a/bfd/elf.c b/bfd/elf.c
index d65c78d..dbb32ca 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7553,6 +7553,11 @@ elfcore_grok_ppc_vmx (bfd *abfd, Elf_Internal_Note *note)
return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vmx", note);
}
+static bfd_boolean
+elfcore_grok_ppc_vsx (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vsx", note);
+}
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
@@ -7908,6 +7913,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_PPC_VSX:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_ppc_vsx (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
@@ -8475,6 +8487,18 @@ elfcore_write_ppc_vmx (bfd *abfd,
}
char *
+elfcore_write_ppc_vsx (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *ppc_vsx,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_PPC_VSX, ppc_vsx, size);
+}
+
+char *
elfcore_write_register_note (bfd *abfd,
char *buf,
int *bufsiz,
@@ -8488,6 +8512,8 @@ elfcore_write_register_note (bfd *abfd,
return elfcore_write_prxfpreg (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-ppc-vmx") == 0)
return elfcore_write_ppc_vmx (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-ppc-vsx") == 0)
+ return elfcore_write_ppc_vsx (abfd, buf, bufsiz, data, size);
return NULL;
}