aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2011-12-06 14:09:12 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2011-12-06 14:09:12 +0000
commit355b81d94960ef44b9773b9fe2b6646af2ddd5a2 (patch)
tree0ce356f801aee11c12bdd2e4b40b5bf418c19bbb /bfd/elf.c
parentb18003d16853012faa6097da68d995bc54b8e66b (diff)
downloadgdb-355b81d94960ef44b9773b9fe2b6646af2ddd5a2.zip
gdb-355b81d94960ef44b9773b9fe2b6646af2ddd5a2.tar.gz
gdb-355b81d94960ef44b9773b9fe2b6646af2ddd5a2.tar.bz2
include/elf/ChangeLog:
* common.h (NT_S390_LAST_BREAK): Define. (NT_S390_SYSTEM_CALL): Likewise. bfd/ChangeLog: * elf-bfd.h (elfcore_write_s390_last_break): Add prototype. (elfcore_write_s390_system_call): Likewise. * elf.c (elfcore_write_s390_last_break): New function. (elfcore_write_s390_system_call): Likewise. (elfcore_write_register_note): Call them. (elfcore_grok_s390_last_break): New function. (elfcore_grok_s390_system_call): Likewise. (elfcore_grok_note): Call them.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index dc6a9bb..f1e4882 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7983,6 +7983,18 @@ elfcore_grok_s390_prefix (bfd *abfd, Elf_Internal_Note *note)
}
static bfd_boolean
+elfcore_grok_s390_last_break (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-last-break", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_system_call (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-system-call", note);
+}
+
+static bfd_boolean
elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note)
{
return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note);
@@ -8407,6 +8419,20 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
else
return TRUE;
+ case NT_S390_LAST_BREAK:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_last_break (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_SYSTEM_CALL:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_system_call (abfd, note);
+ else
+ return TRUE;
+
case NT_ARM_VFP:
if (note->namesz == 6
&& strcmp (note->namedata, "LINUX") == 0)
@@ -9168,6 +9194,32 @@ elfcore_write_s390_prefix (bfd *abfd,
}
char *
+elfcore_write_s390_last_break (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_last_break,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_LAST_BREAK,
+ s390_last_break, size);
+}
+
+char *
+elfcore_write_s390_system_call (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_system_call,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_SYSTEM_CALL,
+ s390_system_call, size);
+}
+
+char *
elfcore_write_arm_vfp (bfd *abfd,
char *buf,
int *bufsiz,
@@ -9209,6 +9261,10 @@ elfcore_write_register_note (bfd *abfd,
return elfcore_write_s390_ctrs (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-s390-prefix") == 0)
return elfcore_write_s390_prefix (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-last-break") == 0)
+ return elfcore_write_s390_last_break (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-system-call") == 0)
+ return elfcore_write_s390_system_call (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-arm-vfp") == 0)
return elfcore_write_arm_vfp (abfd, buf, bufsiz, data, size);
return NULL;