+2010-02-09 Michael Holzheu <holzheu@de.ibm.com>
+
+ * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
+ elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
+ elfcore_write_s390_prefix): New.
+ * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
+ elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
+ elfcore_write_s390_prefix): New.
+ (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
+ NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
+ (elfcore_write_register_note): Handle .reg-s390-timer,
+ .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
+ .reg-s390-prefix section.
+
2010-02-09 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_ppc_vsx
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_timer
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_todcmp
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_todpreg
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_ctrs
+ (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_s390_prefix
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_lwpstatus
(bfd *, char *, int *, long, int, const void *);
extern char *elfcore_write_register_note
return elfcore_make_note_pseudosection (abfd, ".reg-s390-high-gprs", note);
}
+static bfd_boolean
+elfcore_grok_s390_timer (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-timer", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_todcmp (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-todcmp", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_todpreg (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-todpreg", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_ctrs (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-ctrs", note);
+}
+
+static bfd_boolean
+elfcore_grok_s390_prefix (bfd *abfd, Elf_Internal_Note *note)
+{
+ return elfcore_make_note_pseudosection (abfd, ".reg-s390-prefix", note);
+}
+
#if defined (HAVE_PRPSINFO_T)
typedef prpsinfo_t elfcore_psinfo_t;
#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */
else
return TRUE;
+ case NT_S390_TIMER:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_timer (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_TODCMP:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_todcmp (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_TODPREG:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_todpreg (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_CTRS:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_ctrs (abfd, note);
+ else
+ return TRUE;
+
+ case NT_S390_PREFIX:
+ if (note->namesz == 6
+ && strcmp (note->namedata, "LINUX") == 0)
+ return elfcore_grok_s390_prefix (abfd, note);
+ else
+ return TRUE;
+
case NT_PRPSINFO:
case NT_PSINFO:
if (bed->elf_backend_grok_psinfo)
s390_high_gprs, size);
}
+char *
+elfcore_write_s390_timer (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_timer,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_TIMER, s390_timer, size);
+}
+
+char *
+elfcore_write_s390_todcmp (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_todcmp,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_TODCMP, s390_todcmp, size);
+}
+
+char *
+elfcore_write_s390_todpreg (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_todpreg,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_TODPREG, s390_todpreg, size);
+}
+
+char *
+elfcore_write_s390_ctrs (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_ctrs,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_CTRS, s390_ctrs, size);
+}
+
+char *
+elfcore_write_s390_prefix (bfd *abfd,
+ char *buf,
+ int *bufsiz,
+ const void *s390_prefix,
+ int size)
+{
+ char *note_name = "LINUX";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_S390_PREFIX, s390_prefix, size);
+}
+
char *
elfcore_write_register_note (bfd *abfd,
char *buf,
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);
+ if (strcmp (section, ".reg-s390-timer") == 0)
+ return elfcore_write_s390_timer (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-todcmp") == 0)
+ return elfcore_write_s390_todcmp (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-todpreg") == 0)
+ return elfcore_write_s390_todpreg (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-s390-ctrs") == 0)
+ 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);
return NULL;
}