public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org, nickc@redhat.com
Subject: Re: [PATCH v3] ld: add --package-metadata
Date: Thu, 26 May 2022 11:46:25 +0100	[thread overview]
Message-ID: <abce61cbce19a130c5cf177c9c192ad6ecd4e2b7.camel@debian.org> (raw)
In-Reply-To: <Yo76J0kJ8YhKt7di@squeak.grove.modra.org>

[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]

On Thu, 2022-05-26 at 13:25 +0930, Alan Modra wrote:
> On Wed, May 25, 2022 at 02:41:47PM +0100, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <bluca@debian.org>
> > 
> > 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.
> > ---
> > v2: fix style issues
> >     fix ASAN issue: note storage is rounded up, but that size
> >     was used to read the json input, which is fixed
> >     add entry to NEWS
> >     add note about json validation to docs
> > v3: switch libjansson support to disabled-by-default even if
> >       the library is available in the build environment
> >     update new test to account for old/new readelf, which
> >       might or might not pretty-print the FDO note
> >     update bootstrap test to link with jansson if the object
> >       files being linked were built with it
> >     remove dead code
> 
> I'm about to commit this with a few formatting fixes, and with a
> working bootstrap.exp change.  That one was obviously not tested.  The
> idea was good but ld config.h is not in $srcdir/.., and besides that
> it's on the build machine not the host (*), and plain grep is more
> likely to exist than fgrep.
> 
> *) build vs host doesn't matter much in bootstrap.exp since those
> tests are only run when native, but I'd like to get it correct for
> someone doing copy/paste for a future config.h test.

Thanks for fixing it! I did test it, and it was working on my machine,
both with and without the new build flag:

Running /home/bluca/git/binutils-gdb/ld/testsuite/ld-bootstrap/bootstrap.exp ...
Running /home/bluca/git/binutils-gdb/ld/testsuite/ld-bpf/bpf.exp ...

I imagine this is because I was running 'make check' from the ld/
directory? I took '$srcdir' and 'fgrep' from existing scripts in other
tests in ld/testsuite. Anyway, the important thing is that it's all
good now.

Thanks again!

-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-05-26 10:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 19:18 [PATCH] " luca.boccassi
2022-05-16 16:40 ` Fangrui Song
2022-05-17  6:03   ` Florian Weimer
2022-05-17 14:44     ` Luca Boccassi
2022-05-25  6:56       ` Fangrui Song
2022-05-25  7:53         ` Florian Weimer
2022-05-23 11:26 ` Luca Boccassi
2022-05-24  9:34   ` Jose E. Marchesi
2022-05-24 11:26     ` Luca Boccassi
2022-05-24 16:23 ` Nick Clifton
2022-05-24 18:38   ` Luca Boccassi
2022-05-25  8:45     ` Florian Weimer
2022-05-25 13:53       ` Luca Boccassi
2022-05-30 14:08         ` Florian Weimer
2022-05-24 16:28 ` Nick Clifton
2022-05-24 21:15 ` [PATCH v2] " luca.boccassi
2022-05-25  4:30   ` Alan Modra
2022-05-25  6:02     ` Alan Modra
2022-05-25 13:42       ` Luca Boccassi
2022-05-25 13:41 ` [PATCH v3] " luca.boccassi
2022-05-26  3:55   ` Alan Modra
2022-05-26 10:46     ` Luca Boccassi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abce61cbce19a130c5cf177c9c192ad6ecd4e2b7.camel@debian.org \
    --to=bluca@debian.org \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).