public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Ulf Samuelsson <binutils@emagii.com>, binutils@sourceware.org
Subject: Re: [PATCH v4 0/5] Add support for CRC64 generation in linker
Date: Tue, 21 Feb 2023 12:02:52 +0000	[thread overview]
Message-ID: <fa127236-f02e-631d-23eb-71aaabd68cd6@redhat.com> (raw)
In-Reply-To: <c6ace8a6-bc15-6355-27dc-125c97536b15@emagii.com>

Hi Ulf,

> Fourth patchset.
> Get rid of binaries in testsuite.

Thanks.

I do wonder if it would be possible to simplify some of the extensions
to the linker script syntax, in order to make it easier to use and to
allow for future extensions.  For example:

   DIGEST "algorithm" ( start_symbol,  end_symbol )

So "algorithm" could be "CRC" or "CRC32" or "CRC64" or "CRC64-WE" or
"CRC TABLE" or any of the other algorithms/features that you want to
support[1].  And more could be added in the future without having to
update the linker script syntax.

If the algorithm needs extra data apart from the start and end symbols
then this could be included in the name, eg:

   DIGEST "CRC64-POLY-0xDEADBEEFDEADBEEF" (ecc_start , ecc_end)

I would also suggest that functionality should not be restricted to
just the .text section, but that it should work for any section.  (It
is reasonable to restrict it to only working inside a single section
however).


> An algorithm typically needs
> <type> *init_<algo>_tab( <type> poly )
> <type> calc_<algo>_inv( const unsigned char *input_str, size_t num_bytes );
> <type> calc_<algo>    ( const unsigned char *input_str, size_t num_bytes );
> void lang_add_<algo>_syndrome(bool invert, bfd_vma poly)
> void lang_add_<algo>_table(void)

Since there are going to be several different versions of these functions,
and possibly more to come in the future, I think that it would be best to
put them into a new file. eg lddigest.c  This might also make it easier for
other linkers to make use of the code, should they decide to implement a
similar feature.


I am going to post some individual reviews of the patches as well, but I
wanted to give my overall impressions here.

Cheers
   Nick

[1] Well except for TIMESTAMP and DEBUG ON/OFF which are valid new
features in their own rights.


  reply	other threads:[~2023-02-21 12:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 19:45 [PATCH v4 0/5 " binutils
2023-02-19 19:45 ` [PATCH v4 1/5] CRC64 commands documentation binutils
2023-02-19 19:50   ` [PATCH v4 0/5] Add support for CRC64 generation in linker Ulf Samuelsson
2023-02-21 12:02     ` Nick Clifton [this message]
2023-02-21 13:10       ` Ulf Samuelsson
2023-02-21 13:30       ` Ulf Samuelsson
2023-02-21 12:53   ` [PATCH v4 1/5] CRC64 commands documentation Nick Clifton
2023-02-21 13:24     ` Ulf Samuelsson
2023-02-19 19:45 ` [PATCH v4 2/5] CRC64 testsuite binutils
2023-02-21 12:42   ` Nick Clifton
2023-02-21 15:13     ` Ulf Samuelsson
2023-02-23 10:10       ` Nick Clifton
2023-02-23 10:53         ` Ulf Samuelsson
2023-02-23 11:01           ` Nick Clifton
2023-02-28 11:11         ` Ulf Samuelsson
2023-02-28 12:37           ` Nick Clifton
2023-02-28 13:01             ` Ulf Samuelsson
2023-02-28 13:06               ` Nick Clifton
2023-02-28 14:24                 ` Ulf Samuelsson
2023-02-28 13:45             ` Ulf Samuelsson
2023-02-19 19:45 ` [PATCH v4 3/5] ldlex.l: CRC64 binutils
2023-02-19 19:45 ` [PATCH v4 4/5] ldgram.y: CRC64 binutils
2023-02-19 19:45 ` [PATCH v4 5/5] Calculate CRC64 over the .text area binutils
2023-02-21 13:26   ` Nick Clifton
2023-02-23  8:36     ` Ulf Samuelsson

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=fa127236-f02e-631d-23eb-71aaabd68cd6@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@emagii.com \
    --cc=binutils@sourceware.org \
    /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).