aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/elf-bfd.h4
-rw-r--r--bfd/elf.c55
3 files changed, 70 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f6d2513..8d8ec22 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
+ (elfcore_write_s390_vxrs_high): Likewise.
+ * elf.c (elfcore_grok_s390_vxrs_low): New function.
+ (elfcore_grok_s390_vxrs_high): New function.
+ (elfcore_grok_note): Call them.
+ (elfcore_write_s390_vxrs_low): New function.
+ (elfcore_write_s390_vxrs_high): New function.
+ (elfcore_write_register_note): Call them.
+
2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
PR 17995
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 495053d..156eec7 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2285,6 +2285,10 @@ extern char *elfcore_write_s390_system_call
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_s390_tdb
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_vxrs_low
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_vxrs_high
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_arm_vfp
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_aarch_tls
diff --git a/bfd/elf.c b/bfd/elf.c
index 0aa5f8e..14bc531 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8251,6 +8251,18 @@ elfcore_grok_s390_tdb (bfd *abfd, Elf_Internal_Note *note)
}
static bfd_boolean
+elfcore_grok_s390_vxrs_low (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-vxrs-low", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_vxrs_high (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-vxrs-high", note);
+}
+
+static bfd_boolean
elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
{
return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
@@ -8714,6 +8726,20 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_S390_VXRS_LOW:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_vxrs_low (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_VXRS_HIGH:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_vxrs_high (abfd, note);
+ else
+ return TRUE;
+
case NT_ARM_VFP:
if (note->namesz == 6
&& strcmp (note->namedata, "LINUX") == 0)
@@ -9580,6 +9606,31 @@ elfcore_write_s390_tdb (bfd *abfd,
}
char *
+elfcore_write_s390_vxrs_low (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_vxrs_low,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_VXRS_LOW, s390_vxrs_low, size);
+}
+
+char *
+elfcore_write_s390_vxrs_high (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_vxrs_high,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_VXRS_HIGH,
+ s390_vxrs_high, size);
+}
+
+char *
elfcore_write_arm_vfp (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9663,6 +9714,10 @@ elfcore_write_register_note (bfd *abfd,
return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-s390-tdb") == 0)
return elfcore_write_s390_tdb (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-vxrs-low") == 0)
+ return elfcore_write_s390_vxrs_low (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-vxrs-high") == 0)
+ return elfcore_write_s390_vxrs_high (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-arm-vfp") == 0)
return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-aarch-tls") == 0)