diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-12-18 16:21:51 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-12-18 16:21:51 +0000 |
commit | 0675e188654a7092145ac3b5933ecb6d0cf5c6a3 (patch) | |
tree | a2744bd0a329565897b5e2bcd97aaa6081667859 /bfd | |
parent | 06ca79620f5d03763c1d9109a12da077939fb3e8 (diff) | |
download | gdb-0675e188654a7092145ac3b5933ecb6d0cf5c6a3.zip gdb-0675e188654a7092145ac3b5933ecb6d0cf5c6a3.tar.gz gdb-0675e188654a7092145ac3b5933ecb6d0cf5c6a3.tar.bz2 |
include/elf/
* common.h (NT_S390_HIGH_GPRS): Define.
bfd/
* elf.c (elfcore_grok_s390_high_gprs): New function.
(elfcore_grok_note): Handle NT_S390_HIGH_GPRS notes.
(elfcore_write_s390_high_gprs): New function.
(elfcore_write_register_note): Call it.
binutils/
* readelf.c (get_note_type): Handle NT_S390_HIGH_GPRS notes.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf.c | 28 |
2 files changed, 35 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1c4412a..036cc9f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2009-12-18 Ulrich Weigand <uweigand@de.ibm.com> + + * elf.c (elfcore_grok_s390_high_gprs): New function. + (elfcore_grok_note): Handle NT_S390_HIGH_GPRS notes. + (elfcore_write_s390_high_gprs): New function. + (elfcore_write_register_note): Call it. + 2009-12-17 Alan Modra <amodra@bigpond.net.au> PR ld/11088 @@ -7638,6 +7638,12 @@ elfcore_grok_ppc_vsx (bfd *abfd, Elf_Internal_Note *note) return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vsx", note); } +static bfd_boolean +elfcore_grok_s390_high_gprs (bfd *abfd, Elf_Internal_Note *note) +{ + return elfcore_make_note_pseudosection (abfd, ".reg-s390-high-gprs", note); +} + #if defined (HAVE_PRPSINFO_T) typedef prpsinfo_t elfcore_psinfo_t; #if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */ @@ -7999,6 +8005,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) else return TRUE; + case NT_S390_HIGH_GPRS: + if (note->namesz == 6 + && strcmp (note->namedata, "LINUX") == 0) + return elfcore_grok_s390_high_gprs (abfd, note); + else + return TRUE; + case NT_PRPSINFO: case NT_PSINFO: if (bed->elf_backend_grok_psinfo) @@ -8641,6 +8654,19 @@ elfcore_write_ppc_vsx (bfd *abfd, note_name, NT_PPC_VSX, ppc_vsx, size); } +static char * +elfcore_write_s390_high_gprs (bfd *abfd, + char *buf, + int *bufsiz, + const void *s390_high_gprs, + int size) +{ + char *note_name = "LINUX"; + return elfcore_write_note (abfd, buf, bufsiz, + note_name, NT_S390_HIGH_GPRS, + s390_high_gprs, size); +} + char * elfcore_write_register_note (bfd *abfd, char *buf, @@ -8657,6 +8683,8 @@ elfcore_write_register_note (bfd *abfd, 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); + if (strcmp (section, ".reg-s390-high-gprs") == 0) + return elfcore_write_s390_high_gprs (abfd, buf, bufsiz, data, size); return NULL; } |