public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ulf Samuelsson <binutils@emagii.com>
To: Nick Clifton <nickc@redhat.com>, binutils@sourceware.org
Subject: Re: [PATCH v4 5/5] Calculate CRC64 over the .text area
Date: Thu, 23 Feb 2023 09:36:11 +0100	[thread overview]
Message-ID: <394ec3be-b855-f9e2-328e-b301e23a8230@emagii.com> (raw)
In-Reply-To: <4c21a7ab-9383-f4c5-c300-dc35e24c3ebf@redhat.com>


On 2023-02-21 14:26, Nick Clifton wrote:
> Hi Ulf,
>
> Please try to follow the GNU Coding standards when writing
> new code:
>
>   https://www.gnu.org/prep/standards/
>
> Having a consistent style greatly improves the readability
> of the code.
>
I will run 'indent' on my files.

If I add code to other files, is it OK to run indent on those?

>
>
>> +      einfo (_("%P:%pS: warning: Only the first CRC polynome is 
>> used\n"),
>> +        NULL);
>
> Is there a particular reason why multiple CRC polynomes are not 
> supported ?

Declaring a polynome will result in the CRC being calculated for the 
declared area.
That seems to be enough to cover the needs.

There may be a need for multiple areas, but I do not see a need for
calculating CRC64-ECMA on one area and CRC64-ISO on another area.

If the user wants to calculate CRC for another purpose, they can add code
in their project, but calculating CRC over the text area is problematic 
today.

>
>
>> +  for (bfd_vma i = 0 ; i < 256 ; i++)
>
> You could just use an integer for this loop....
>
True, but bfd_vma is a 64-bit integer, and I thought that keeping
that for everything would keep things simple.
>> +  /*
>> +   * Get the '.text' section
>> +   * Is there a risk that CRC needs to be calculated on more than 
>> .text?
>> +   * We do not support that...
>
> You definitely should.
>
Is there an easy way to figure out which section a symbol is located in?

If not, my idea is to implement "DIGEST SECTION "<section>" to specify this.


> I think that I will save a full review of this code until the 
> formatting is
> fixed up.
>
Tried running the testsuite, but

$ make check-ld RUNTESTFLAGS='ld-scripts/script.exp'

results in failures for my tests.

Can I retrieve any detailed error messages?


Cheers
>   Nick
>

      reply	other threads:[~2023-02-23  8:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 19:45 [PATCH v4 0/5 Add support for CRC64 generation in linker 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
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 [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=394ec3be-b855-f9e2-328e-b301e23a8230@emagii.com \
    --to=binutils@emagii.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).