Message ID | 20211126170127.1075409-1-luca.boccassi@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v2] elf: add definition for NT_FDO_PACKAGING_METADATA note | expand |
* luca boccassi: > From: Luca Boccassi <bluca@debian.org> > > As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/ > this note will be used starting from Fedora 36. > > Signed-off-by: Luca Boccassi <bluca@debian.org> > --- > v2: as suggested by Mark, indent comment and add NT_ suffix > > elf/elf.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/elf/elf.h b/elf/elf.h > index 50f87baceb..f2b72bd9f5 100644 > --- a/elf/elf.h > +++ b/elf/elf.h > @@ -1302,6 +1302,10 @@ typedef struct > /* Program property. */ > #define NT_GNU_PROPERTY_TYPE_0 5 > > +/* Packaging metadata as defined on > + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */ > +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e > + > /* Note section name of program property. */ > #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" Would you please add a definition of ELF_NOTE_FDO earlier in the file, similar to ELF_NOTE_GNU? I would like to point out that the format of the note is JSON-encoded, so it's not really how we have done things so far in the GNU ABI. I guess we can add this as a one-off exception. It shouldn't be an example where things are supposed to go in the future. Thanks, Florian
On Fri, 2021-11-26 at 21:27 +0100, Florian Weimer wrote: > * luca boccassi: > > > From: Luca Boccassi <bluca@debian.org> > > > > As defined on: https://systemd.io/COREDUMP_PACKAGE_METADATA/ > > this note will be used starting from Fedora 36. > > > > Signed-off-by: Luca Boccassi <bluca@debian.org> > > --- > > v2: as suggested by Mark, indent comment and add NT_ suffix > > > > elf/elf.h | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/elf/elf.h b/elf/elf.h > > index 50f87baceb..f2b72bd9f5 100644 > > --- a/elf/elf.h > > +++ b/elf/elf.h > > @@ -1302,6 +1302,10 @@ typedef struct > > /* Program property. */ > > #define NT_GNU_PROPERTY_TYPE_0 5 > > > > +/* Packaging metadata as defined on > > + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */ > > +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e > > + > > /* Note section name of program property. */ > > #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" > > Would you please add a definition of ELF_NOTE_FDO earlier in the > file, > similar to ELF_NOTE_GNU? > > I would like to point out that the format of the note is JSON- > encoded, > so it's not really how we have done things so far in the GNU ABI. I > guess we can add this as a one-off exception. It shouldn't be an > example where things are supposed to go in the future. > > Thanks, > Florian Sent v3 as suggested, thanks.
diff --git a/elf/elf.h b/elf/elf.h index 50f87baceb..f2b72bd9f5 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -1302,6 +1302,10 @@ typedef struct /* Program property. */ #define NT_GNU_PROPERTY_TYPE_0 5 +/* Packaging metadata as defined on + https://systemd.io/COREDUMP_PACKAGE_METADATA/ */ +#define NT_FDO_PACKAGING_METADATA 0xcafe1a7e + /* Note section name of program property. */ #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"