From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id BEC2B3858C83 for ; Thu, 23 Feb 2023 08:36:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEC2B3858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from [10.175.196.145] (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 4E34C1201CC; Thu, 23 Feb 2023 09:36:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677141375; bh=ZL2Epa1emEgApH3P2WFEwgm9RxPh+V5lOKCg/80ZOiU=; h=Subject:To:From; b=elVGITo4BXMomRojr+Y5airjcX5v+0BAs8Gr/bM7mTD+qUfS59P5MogZOVNpFBXSM vaaNR7aYJ702poySKibuWdGbibMEdm2TFSQERYm1qVd0o+5MUaHP4IsyG+4An/axew +Y/m4c1jv6x1m4RJ8mDGtJCRjElA8rpICVl8ob2c= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=[10.175.196.145] Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) Message-ID: <394ec3be-b855-f9e2-328e-b301e23a8230@emagii.com> Date: Thu, 23 Feb 2023 09:36:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v4 5/5] Calculate CRC64 over the .text area To: Nick Clifton , binutils@sourceware.org References: <20230219194549.22554-1-binutils@emagii.com> <20230219194549.22554-6-binutils@emagii.com> <4c21a7ab-9383-f4c5-c300-dc35e24c3ebf@redhat.com> Content-Language: en-US From: Ulf Samuelsson In-Reply-To: <4c21a7ab-9383-f4c5-c300-dc35e24c3ebf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167714137436.3088634.8406763554743246039@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,SPF_HELO_FAIL,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 "
" 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 >