]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf.c
ld: add --package-metadata
authorLuca Boccassi <bluca@debian.org>
Wed, 25 May 2022 13:41:47 +0000 (14:41 +0100)
committerAlan Modra <amodra@gmail.com>
Thu, 26 May 2022 03:26:12 +0000 (12:56 +0930)
commit9e2bb0cb5e74aed4158f08495534922d7108f928
treeed3ed33aef50a4bd5e0f16d3072340a81d0d0b4f
parentd1a24139adfb2f029c9d52a9c43da44a617f90a4
ld: add --package-metadata

Generate a .note.package FDO package metadata ELF note, following
the spec: https://systemd.io/ELF_PACKAGE_METADATA/

If the jansson library is available at build time (and it is explicitly
enabled), link ld to it, and use it to validate that the input is
correct JSON, to avoid writing garbage to the file. The
configure option --enable-jansson has to be used to explicitly enable
it (error out when not found). This allows bootstrappers (or others who
are not interested) to seamlessly skip it without issues.
17 files changed:
bfd/elf-bfd.h
bfd/elf.c
ld/Makefile.am
ld/Makefile.in
ld/NEWS
ld/aclocal.m4
ld/config.in
ld/configure
ld/configure.ac
ld/emultempl/elf.em
ld/ld.texi
ld/ldelf.c
ld/ldelf.h
ld/lexsup.c
ld/testsuite/ld-bootstrap/bootstrap.exp
ld/testsuite/ld-elf/package-note.exp [new file with mode: 0644]
ld/testsuite/ld-elf/package-note.rd [new file with mode: 0644]