diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 7a3289bfaa85..5c1acf0d1f81 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.102 2021/05/18 08:59:44 hannken Exp $ */ +/* $NetBSD: exec_elf.c,v 1.103 2022/06/08 10:12:42 rin Exp $ */ /*- * Copyright (c) 1994, 2000, 2005, 2015, 2020 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.102 2021/05/18 08:59:44 hannken Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.103 2022/06/08 10:12:42 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_pax.h" @@ -1084,6 +1084,9 @@ netbsd_elf_note(struct exec_package *epp, case ELF_NOTE_TYPE_GO_BUILDID_TAG: break; + case ELF_NOTE_TYPE_FDO_PACKAGING_METADATA: + break; + case ELF_NOTE_TYPE_NETBSD_EMUL_TAG: /* Ancient NetBSD version tag */ break; diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h index a423f0f5e6d0..d87e23af63d7 100644 --- a/sys/sys/exec_elf.h +++ b/sys/sys/exec_elf.h @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.169 2022/05/28 22:00:55 andvar Exp $ */ +/* $NetBSD: exec_elf.h,v 1.170 2022/06/08 10:12:42 rin Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -1027,6 +1027,19 @@ typedef struct { #define ELF_NOTE_GO_BUILDID_DESCSZ 40 #define ELF_NOTE_GO_BUILDID_NAME "Go\0\0" +/* + * FDO-specific note type: packaging metadata + * name: FDO\0 + * namesz: 4 + * desc: + * a single JSON object encoded as a zero-terminated UTF-8 string + * (see https://systemd.io/COREDUMP_PACKAGE_METADATA/) + * descsz: variable + */ +#define ELF_NOTE_TYPE_FDO_PACKAGING_METADATA 0xcafe1a7e +#define ELF_NOTE_FDO_PACKAGING_METADATA_NAMESZ 4 +#define ELF_NOTE_FDO_PACKAGING_METADATA_NAME "FDO\0" + /* NetBSD-specific note type: NetBSD ABI version. * name: NetBSD\0\0 * namesz: 8