public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Luca Boccassi <bluca@debian.org>
Cc: binutils@sourceware.org, Nick Clifton <nickc@redhat.com>
Subject: Re: [PATCH] ld: add --package-metadata
Date: Tue, 24 May 2022 11:34:05 +0200	[thread overview]
Message-ID: <87y1yr1dgy.fsf@oracle.com> (raw)
In-Reply-To: <CAMw=ZnT79W3rYSzsqtX7oybZktWOQRqCu5udq7xDX14DE4weiA@mail.gmail.com> (Luca Boccassi's message of "Mon, 23 May 2022 12:26:31 +0100")


Hi Luca.

>> I've added an optional usage of libjansson to provide additional validation,
>> so that it doesn't have to be reimplemented everywhere a thousand
>> times over.
>> For bootstrapping purposes the dep is optional and can be skipped, for example
>> in Debian/Ubuntu it would be annotated with <!stage1> so that everything
>> works out of the box.

As far as I can see at https://systemd.io/COREDUMP_PACKAGE_METADATA/ the
payload encoded in JSON comprises a single object which must be a
dictionary, whose entries all contain strings.  Basically:

  {"..." : "..."[, "..." : "..."]*}

Isn't it a bit overkill to add a dependency to an external library just
to verify the format of the above?  A regular expression would suffice,
even if a fastidious one due to the string format:

  S -> JSON string
  B -> [\n\t ]*

  PAYLOAD -> B{BSB:BSB(,SB:BSB)*}B

>>
>>  bfd/elf-bfd.h                        |   8 ++
>>  bfd/elf.c                            |   6 +-
>>  ld/Makefile.am                       |   6 +-
>>  ld/configure.ac                      |  35 ++++++++
>>  ld/emultempl/elf.em                  |   9 ++
>>  ld/ld.texi                           |   7 ++
>>  ld/ldelf.c                           | 121 ++++++++++++++++++++++++++-
>>  ld/ldelf.h                           |   2 +
>>  ld/lexsup.c                          |   2 +
>>  ld/testsuite/ld-elf/package-note.exp |  49 +++++++++++
>>  ld/testsuite/ld-elf/package-note.rd  |   6 ++
>>  11 files changed, 244 insertions(+), 7 deletions(-)
>>  create mode 100644 ld/testsuite/ld-elf/package-note.exp
>>  create mode 100644 ld/testsuite/ld-elf/package-note.rd
>
> Hi Nick,
>
> Did you have any chance to look at this? Any thoughts? Thanks!
>
> Kind regards,
> Luca Boccassi

  reply	other threads:[~2022-05-24  9:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 19:18 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 [this message]
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

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=87y1yr1dgy.fsf@oracle.com \
    --to=jose.marchesi@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=bluca@debian.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).