Package information on ELF objects
Programs crash. And when they do, they dump core, and we want to tell the user which package, including the version, caused the failure. This talk describes a compact JSON-based format that is embedded directly in the binaries as an ELF note. By embedding the this information directly in the binary object, package information is immediately available from a core dump, independently of any external packaging metadata. This is a cross-distro collaboration, with the eventual goal of having the same metadata automatically added by all distributions.
The general idea is to add a terse JSON note as .note.package ELF note. This note identifies who and where built the binary: the distro or vendor, distro version, package version, architecture, etc. This is useful when programs compiled for different distributions are mixed (e.g. Debian container running on Fedora), when non-distribution programs are used with a distro (e.g. a private program), when distribution metadata has been stripped (e.g. an initrd image), or when only offline access is possible.
This metadata can cooexist with the existing .note.gnu.build-id ELF notes. Those are added by most distributions, but they only provide a build-id hash. To resolve this hash to an actual package name and version, some additional query is required.
Links:
python, systemd, fedora linux
Debian Developer, member of maintainers teams of DPDK/systemd/ZeroMQ, Software Engineer at Microsoft
