Writing core files to contain buildids

Mark Wielaard mark@klomp.org
Tue Oct 27 14:39:45 GMT 2020


Hi Paul,

On Mon, 2020-10-26 at 03:06 -0400, Paul Smith wrote:
> We use this for various reasons rather than relying on the Linux
> kernel
> coredumper and it's worked well for us for many years now.  However, I
> would like to start using build IDs in our shared libs and binaries and
> to take best advantage of that I need to ensure that the build ID
> values appear in the generated core files, which, at the moment, they
> do not unfortunately.
> 
> I'm hoping someone can point me to some information about what extra
> content I need to make sure is preserved in the generated coredump so
> that I can retrieve build IDs from it.

The basic idea behind getting buildids into core files is that they
(the GNU ELF notes) are at the start of the file in the first page that
is dumped (together with the phdrs) in the core file so when core file
consumers can walk the program headers and find the buildid note
(almost immediately following those headers).

A few more technical details can be found at:
https://fedoraproject.org/wiki/Releases/FeatureBuildId#Include_build_IDs_in_core_dumps

Hope that helps,

Mark


More information about the Elfutils-devel mailing list