diff options
author | Nick Clifton <nickc@redhat.com> | 2013-03-08 17:13:31 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2013-03-08 17:13:31 +0000 |
commit | abb3f6cca7cd9d8ab574d252cab8e64928d7c40f (patch) | |
tree | 6b885f9bf0fa1f5ef7ac5d8fa4fdd04adb5ef36d /bfd | |
parent | 9b67fcec82bb8627fb39770365eb42ca98b397a1 (diff) | |
download | gdb-abb3f6cca7cd9d8ab574d252cab8e64928d7c40f.zip gdb-abb3f6cca7cd9d8ab574d252cab8e64928d7c40f.tar.gz gdb-abb3f6cca7cd9d8ab574d252cab8e64928d7c40f.tar.bz2 |
* elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
* elf.c (elfcore_write_s390_tdb): New function.
(elfcore_write_register_note): Call it.
(elfcore_grok_s390_tdb): New function.
(elfcore_grok_note): Call it.
* readelf.c (get_note_type): Add NT_S390_TDB.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/elf-bfd.h | 6 | ||||
-rw-r--r-- | bfd/elf.c | 32 |
3 files changed, 39 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1454f40..d4b07a9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2013-03-08 Andreas Arnez <arnez@linux.vnet.ibm.com> + + * elf-bfd.h (elfcore_write_s390_tdb): Add prototype. + * elf.c (elfcore_write_s390_tdb): New function. + (elfcore_write_register_note): Call it. + (elfcore_grok_s390_tdb): New function. + (elfcore_grok_note): Call it. + 2013-03-08 Maciej W. Rozycki <macro@codesourcery.com> * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type. diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 72be700..3f068bb 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1,7 +1,5 @@ /* BFD back-end data structures for ELF files. - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 - Free Software Foundation, Inc. + Copyright 1992-2013 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -2291,6 +2289,8 @@ extern char *elfcore_write_s390_last_break (bfd *, char *, int *, const void *, int); 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_arm_vfp (bfd *, char *, int *, const void *, int); extern char *elfcore_write_aarch_tls @@ -1,9 +1,6 @@ /* ELF executable support for BFD. - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, - 2013 - Free Software Foundation, Inc. + Copyright 1993-2013 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -8175,6 +8172,12 @@ elfcore_grok_s390_system_call (bfd *abfd, Elf_Internal_Note *note) } static bfd_boolean +elfcore_grok_s390_tdb (bfd *abfd, Elf_Internal_Note *note) +{ + return elfcore_make_note_pseudosection (abfd, ".reg-s390-tdb", note); +} + +static bfd_boolean elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note); @@ -8631,6 +8634,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) else return TRUE; + case NT_S390_TDB: + if (note->namesz == 6 + && strcmp (note->namedata, "LINUX") == 0) + return elfcore_grok_s390_tdb (abfd, note); + else + return TRUE; + case NT_ARM_VFP: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) @@ -9485,6 +9495,18 @@ elfcore_write_s390_system_call (bfd *abfd, } char * +elfcore_write_s390_tdb (bfd *abfd, + char *buf, + int *bufsiz, + const void *s390_tdb, + int size) +{ + char *note_name = "LINUX"; + return elfcore_write_note (abfd, buf, bufsiz, + note_name, NT_S390_TDB, s390_tdb, size); +} + +char * elfcore_write_arm_vfp (bfd *abfd, char *buf, int *bufsiz, @@ -9566,6 +9588,8 @@ elfcore_write_register_note (bfd *abfd, 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-s390-tdb") == 0) + return elfcore_write_s390_tdb (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) |