[PATCH] Add support to readelf for reading OpenBSD ELF core notes.
Frederic Cambus
fred@statdns.com
Wed Sep 29 12:03:30 GMT 2021
On Mon, Sep 27, 2021 at 10:17:02AM -0700, John Baldwin wrote:
(Resending this as I didn't see it appear in the Binutils mailing list
archives on sourceware.org or on marc.info, so I'm suspecting a delivery
issue. Please accept my apologies if it had indeed been delivered the
first time.)
> > > binutils/ChangeLog:
> > >
> > > 2021-09-11 Frederic Cambus <fred@statdns.com>
> > >
> > > * readelf.c (get_openbsd_elfcore_note_type): New function.
> > > (process_note): Add support for OpenBSD core notes.
> >
> > Friendly ping. Anyone willing to have a look at this? Thanks.
>
> I think this looks fine, but I am not an approver for binutils.
Thanks for your feedback.
> I noticed that there are also #define's for NT_OPENBSD_XFPREGS
> (presumably for SSE regs on i386?) and NT_OPENBSD_IDENT. Did
> you want to handle those as well? (That is, does modern OpenBSD
> generate those?) The first one is probably a simple change to
> your existing patch. NT_OPENBSD_IDENT might be more involved if
> it is similar to NT_NETBSD_IDENT.
The #define for NT_OPENBSD_XFPREGS is also present in OpenBSD own header
files [1], but the NT_OPENBSD_XFPREGS notes are not generated on OpenBSD,
and to the best of my knowledge have never been generated. The notes
which are generated are described here: https://man.openbsd.org/core.5
Regarding the NT_OPENBSD_IDENT note, it is generated on OpenBSD, but its
content is hardcoded [2] and the version number is not populated.
[1]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/exec_elf.h?rev=1.90&content-type=text/x-cvsweb-markup
[2]: https://cvsweb.openbsd.org/src/lib/csu/os-note-elf.h?rev=1.5&content-type=text/x-cvsweb-markup
More information about the Binutils
mailing list