[PATCH] S390: Add support for TDB notes section
Andreas Krebbel
krebbel@linux.vnet.ibm.com
Fri Mar 8 13:06:00 GMT 2013
More information about the Binutils mailing list
Fri Mar 8 13:06:00 GMT 2013
- Previous message (by thread): [PATCH] S390: Add support for TDB notes section
- Next message (by thread): [PATCH] S390: Add support for TDB notes section
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 08/03/13 13:50, Andreas Arnez wrote: > This patch adds support for the new "transaction diagnostic block" (TDB) > ELF core file notes section. > > Please review and consider for trunk. Could you please add an output string for readelf as well? Bye, -Andreas- > > -- > > diff --git a/bfd/ChangeLog b/bfd/ChangeLog > index 167faff..dc1a238 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-05 Corinna Vinschen <vinschen@redhat.com> > > * config.bfd: Add x86_64-*-cygwin to list of supported targets. > diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h > index 72be700..9319cb7 100644 > --- a/bfd/elf-bfd.h > +++ b/bfd/elf-bfd.h > @@ -2291,6 +2291,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 > diff --git a/bfd/elf.c b/bfd/elf.c > index e0487c2..b4892ba 100644 > --- a/bfd/elf.c > +++ b/bfd/elf.c > @@ -8175,6 +8175,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 +8637,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 +9498,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 +9591,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) > diff --git a/include/elf/common.h b/include/elf/common.h > index 2bae603..b854a7c 100644 > --- a/include/elf/common.h > +++ b/include/elf/common.h > @@ -552,6 +552,8 @@ > /* note name must be "LINUX". */ > #define NT_S390_SYSTEM_CALL 0x307 /* S390 system call restart data */ > /* note name must be "LINUX". */ > +#define NT_S390_TDB 0x308 /* S390 transaction diagnostic block */ > + /* note name must be "LINUX". */ > #define NT_ARM_VFP 0x400 /* ARM VFP registers */ > /* The following definitions should really use NT_AARCH_..., but defined > this way for compatibility with Linux. */ >
- Previous message (by thread): [PATCH] S390: Add support for TDB notes section
- Next message (by thread): [PATCH] S390: Add support for TDB notes section
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list