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 C9A523858C31 for ; Fri, 17 Feb 2023 11:20:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C9A523858C31 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 valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 8EC31120153; Fri, 17 Feb 2023 12:20:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676632824; bh=w5VdodVcD68VDucYY01Al0bFmK6/NguIJcqOXezUk+U=; h=From:To:Subject; b=nCXLLdkLmo8hp591yWnbOnBytNHVcpyUTbNgqb5qfwChXpt2oFDca5pfB1GFKTKw5 AkFBJVIiQa441PU0IBSWwyBgMA0lDt+mIAYdHsC6ErJqpm2GTNLVJORSnKSy/b21Zx K1BayQRwaDppLFyJbPoZe36J5UPcQBKbRvB0GxNU= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Cc: nickc@redhat.com Subject: [PATCH v1 0/5 Add support for CRC64 generation in linker Date: Fri, 17 Feb 2023 12:20:11 +0100 Message-Id: <20230217112016.19718-1-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 X-PPP-Message-ID: <167663282483.4031569.6661529778409844803@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: Supports the following new linker commands: * CRC64 ECMA '(' crc_start ',' crc_end ')' * CRC64 ISO '(' crc_start ',' crc_end ')' * CRC64 POLY '[' mustbe_exp ']' '(' crc_start ',' crc_end ')' * CRC64 POLYI '[' mustbe_exp ']' '(' crc_start ',' crc_end ')' * CRC64 TABLE ECMA == 0x42F0E1EBA9EA3693 ISO == 0xD800000000000000 POLY == Allows your own polynome POLYI == Allows your own polynome, with inversion during calc The CRC is calculated from crc_start to crc_end (not included) The "CRC64 command * Allows specifying the polynom (ECMA(default), ISO or your own) * Allows for inversion in the CRC calculation (CRC64-WE) * Allows specifying the area that should be checked. * reserves room for the CRC (8 bytes) * Declares a symbol ___CRC64___ for the address of the CRC. * Declares a symbol ___CRC64_START___ for the first address of the checked area * Declares a symbol ___CRC64_END___ for the first address after the checked area The CRC TABLE command This is used to speed up the CRC calculation. * Creates a 2kB table which speeds up the CRC calculation * Can insert the 2kB table into the .text section at current location. * Declares a symbol ___CRC64_TABLE___ if the table is inserted. Comments on the code: This version also supports the * DEBUG ON * DEBUG OFF turning on/off yydebug The ld.texi stuff needs some work. Not very experienced with that. Added enty in NEWS Added 4 test cases for the different CRC64 polynome commands. The code is using the libcrc released under an MIT license found in * https://www.libcrc.org/ * https://github.com/lammertb/libcrc/tree/v2.0 Author: Lammert Bies A license for libcrc is added to the patch. [PATCH v1 1/5] ldlex.l: CRC64 [PATCH v1 2/5] ldgram.y: CRC64 [PATCH v1 3/5] Calculate CRC64 over the .text area [PATCH v1 4/5] CRC64 commands documentation [PATCH v1 5/5] CRC64 testsuite