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 AE0153858D32 for ; Tue, 21 Feb 2023 13:24:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE0153858D32 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 0848612021A; Tue, 21 Feb 2023 14:24:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676985891; bh=j7GbH6rAgq9TfFBiEZDRFg4wEfnOlQhxVIUDhji+U+Y=; h=Subject:To:From; b=1YILqBSezoyKHtkUwFtml2Z+KHc/Zh4Y9MANmc0Ze0quW1/C8uoDNBo5ZgfMsGQqR ZX7cHsNhzmyYVFD24l3O+WnlEljLN6a+CMltTDAvxKDpgM+l0rzLd5sN8aHv+6K8h6 TjXVhKB94/7DaX9l3XCllwgc2KYTDFo2qau8zE/4= 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: Date: Tue, 21 Feb 2023 14:24:45 +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 1/5] CRC64 commands documentation Content-Language: sv-FI To: Nick Clifton , binutils@sourceware.org References: <20230219194549.22554-1-binutils@emagii.com> <20230219194549.22554-2-binutils@emagii.com> From: Ulf Samuelsson In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167698589022.1665992.2875191740185368871@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: Den 2023-02-21 kl. 13:53, skrev Nick Clifton: > Hi Ulf, > >> diff --git a/COPYING.CRC64 b/COPYING.CRC64 >> new file mode 100755 >> index 00000000000..618e1c63dae >> --- /dev/null >> +++ b/COPYING.CRC64 >> @@ -0,0 +1,42 @@ >> +The GNU linker contains CRC routines that are used to implement the >> +CRC64 command in the output section. >> + >> +The CRC routines are extracted from LIBCRC available at >> + >> +They are used to >> +* https://www.libcrc.org/ >> +* https://github.com/lammertb/libcrc/tree/v2.0 > > Umm, why do you have the "They are used to" line here ? Cut and paste, sorry about that. > >> +/* >> + * Library: libcrc >> + * File:    src/crc64.c >> + * Author:  Lammert Bies >> + * >> + * This file is licensed under the MIT License as stated below >> + * >> + * Copyright (c) 2016 Lammert Bies >> + * >> + * Permission is hereby granted, free of charge, to any person >> obtaining a copy >> + * of this software and associated documentation files (the >> "Software"), to deal >> + * in the Software without restriction, including without limitation >> the rights >> + * to use, copy, modify, merge, publish, distribute, sublicense, >> and/or sell >> + * copies of the Software, and to permit persons to whom the >> Software is >> + * furnished to do so, subject to the following conditions: >> + * >> + * The above copyright notice and this permission notice shall be >> included in all >> + * copies or substantial portions of the Software. >> + * >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >> EXPRESS OR >> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF >> MERCHANTABILITY, >> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT >> SHALL THE >> + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR >> OTHER >> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, >> ARISING FROM, >> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER >> DEALINGS IN THE >> + * SOFTWARE. >> + * >> + * Description >> + * ----------- >> + * The source file src/crc64.c contains the routines which are >> needed to >> + * calculate a 64 bit CRC value of a sequence of bytes. >> + */ > > Given that the library is not being incorporated as-is into the linker > sources > you should probably indicate the relocated location of the src/crc64.c > code. > That is the LICENSE, right?. The user needs to supply his own routines which uses the table. They can do so by extracting the routines from the libcrc. A cool feature would be to be able to print out the CRC routine from the linker. > >> diff --git a/ld/ld.texi b/ld/ld.texi >> index 7802f0661b0..2042fadb33e 100644 > >> +The CRC32 command defines some global symbols. >> + >> +* @code{___CRC32___}       address of the CRC32 checksum >> + >> +* @code{___CRC32_START___} first address in the checked area. >> + >> +* @code{___CRC32_END___}   first address past the checked area. > > I probably should have mentioned this in my comments for the [v4 0/5] > email, but are these symbol definitions really necessary ?  Given > that the CRC functions have to be invoked from the linker script with > symbol names in their parameters, why define extra symbols ? I expect that the user can provide an expression.    CRC64 ECMA   (header + 16, header + 256 + sizeof(...)) so I do not neccessary have a label to find. Creating my own labels seemed to simplify a lot. I think, but am not 100% sure, that you could add "illegal" names if we want to avoid conflict with the user defined labels. I.E: CRC-32, CRC-32-START, CRC-32-END > > Cheers >   Nick >