+2022-04-01 John Baldwin <jhb@FreeBSD.org>
+
+ * elf-bfd.h (elfcore_write_x86_segbases): New.
+ * elf.c (elfcore_grok_freebsd_note): Add pseudosections for
+ NT_FREEBSD_X86_SEGBASES register notes.
+ (elfcore_write_x86_segbases): New.
+ (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES
+ register notes.
+
2022-04-01 John Baldwin <jhb@FreeBSD.org>
* elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_xstatereg
(bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_x86_segbases
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_ppc_vmx
(bfd *, char *, int *, const void *, int);
extern char *elfcore_write_ppc_vsx
case NT_FREEBSD_PROCSTAT_AUXV:
return elfcore_make_auxv_note_section (abfd, note, 4);
+ case NT_FREEBSD_X86_SEGBASES:
+ return elfcore_make_note_pseudosection (abfd, ".reg-x86-segbases", note);
+
case NT_X86_XSTATE:
return elfcore_grok_xstatereg (abfd, note);
note_name, NT_X86_XSTATE, xfpregs, size);
}
+char *
+elfcore_write_x86_segbases (bfd *abfd, char *buf, int *bufsiz,
+ const void *regs, int size)
+{
+ char *note_name = "FreeBSD";
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, NT_FREEBSD_X86_SEGBASES, regs, size);
+}
+
char *
elfcore_write_ppc_vmx (bfd *abfd,
char *buf,
return elfcore_write_prxfpreg (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-xstate") == 0)
return elfcore_write_xstatereg (abfd, buf, bufsiz, data, size);
+ if (strcmp (section, ".reg-x86-segbases") == 0)
+ return elfcore_write_x86_segbases (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-ppc-vmx") == 0)
return elfcore_write_ppc_vmx (abfd, buf, bufsiz, data, size);
if (strcmp (section, ".reg-ppc-vsx") == 0)