diff options
author | Luca Boccassi <bluca@debian.org> | 2021-11-21 19:43:18 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2022-03-24 23:42:36 +0100 |
commit | 1e5302ad3cf02788339a340f6322d1af1f05d9f9 (patch) | |
tree | 7d6ef8e674ed0393c633ad0d4bfbe0cc54c75be4 /libebl/eblobjnote.c | |
parent | 31d551ae4dd8cf307c68f86b6c1ecac2f92b522a (diff) | |
download | elfutils-1e5302ad3cf02788339a340f6322d1af1f05d9f9.tar.gz |
libebl: recognize FDO Packaging Metadata ELF note
As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/
this note will be used starting from Fedora 36. Allow
readelf --notes to pretty print it:
Note section [ 3] '.note.package' of 76 bytes at offset 0x2e8:
Owner Data size Type
FDO 57 FDO_PACKAGING_METADATA
Packaging Metadata: {"type":"deb","name":"fsverity-utils","version":"1.3-1"}
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Diffstat (limited to 'libebl/eblobjnote.c')
-rw-r--r-- | libebl/eblobjnote.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c index 36efe275..5a7c5c62 100644 --- a/libebl/eblobjnote.c +++ b/libebl/eblobjnote.c @@ -288,6 +288,10 @@ ebl_object_note (Ebl *ebl, uint32_t namesz, const char *name, uint32_t type, if (descsz == 0 && type == NT_VERSION) return; + if (strcmp ("FDO", name) == 0 && type == NT_FDO_PACKAGING_METADATA + && descsz > 0 && desc[descsz - 1] == '\0') + printf(" Packaging Metadata: %.*s\n", (int) descsz, desc); + /* Everything else should have the "GNU" owner name. */ if (strcmp ("GNU", name) != 0) return; |