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 5172838582BE for ; Wed, 22 Feb 2023 16:16:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5172838582BE 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 6FD36120224; Wed, 22 Feb 2023 17:16:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677082610; bh=EcKHeR5m5+19Yzo10EcqKXEGfYnQGqZMN55aFb92RLw=; h=From:To:Subject; b=0acSe7BBErr2RyAi1Y0A6o9qdpFaN6SrX/kxZgrUHmNfNTX33K0KJNmeE2mh1vDy+ jfbX1wSA/Rekusm4K17foMeOvQD/cYy+B7VkZDOSC+EzQto7iiGFUIn09W3K0bFMPe Rl9JC7iV08ZKoCyJyrEMi9kbWBZbPG812X0hUiUw= 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, Ulf Samuelsson Subject: [PATCH v5 02/10] DIGEST: NEWS Date: Wed, 22 Feb 2023 17:16:01 +0100 Message-Id: <20230222161609.239928-3-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222161609.239928-1-binutils@emagii.com> References: <20230222161609.239928-1-binutils@emagii.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167708260928.2544161.14960695325338917581@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: From: Ulf Samuelsson Add info on DEBUG [ON|OFF] TIMESTAMP DIGEST commands Signed-off-by: Ulf Samuelsson --- ld/NEWS | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/ld/NEWS b/ld/NEWS index 4b91f2c3b0a..774ccc732ae 100644 --- a/ld/NEWS +++ b/ld/NEWS @@ -1,5 +1,59 @@ -*- text -*- +* The linker script has a new command to insert a timestamp + TIMESTAMP + inserts the current time (seconds since Epoch) as a 64-bit value + +* The linker script syntax has new commands for debugging a linker script + DEBUG ON turns on debugging + DEBUG OFF turns off debugging + +* The linker script syntax has new commands for handling CRC-32/64 calculations + on the '.text' section + It uses code from https://www.libcrc.org/ + + DIGEST "CRC32" (start, end) + DIGEST "CRC64-ECMA" (start, end) + DIGEST "CRC64-ISO" (start, end) + DIGEST "CRC64-WE" (start, end) + DIGEST POLY (size, polynome)(start, end) + DIGEST POLYI(size, polynome)(start, end) (inversion during CRC calculation) + DIGEST TABLE + DIGEST SECTION "
+ + The CRC32, CRC64-ECMA, CRC64-ISO, CRC64-WE, POLY and POLYI defines + the polynome to use and reserves space for the 32/64-bit CRC in the + '.text' section. + The user can do the CRC check in another section through the + DIGEST SECTION command. + + The 32 bit DIGEST command defines some global symbols. + ___CRC32___ is the address of the CRC64 checksum + ___CRC32_START___ is the address where CRC calculation starts + ___CRC32_END___ The CRC calculation ends before this address. + + The 64-bit DIGEST command defines some global symbols. + ___CRC64___ is the address of the CRC64 checksum + ___CRC64_START___ is the address where CRC calculation starts + ___CRC64_END___ The CRC calculation ends before this address. + + All three symbols must refer to addresses in the selected section. + If they are defined at the end of the linking process, then + the CRC## will be calculated between + + ___CRC##_START___ .. ___CRC##_END___ -1 + + and the result will be inserted at ___CRC##___. + + ___CRC##___ must be outside the region where CRC is calculated + + The DIGEST TABLE command generates a table for CRC generation. + A table is not neccessary, but will speed up the calculation and makes it + compatible with the CRC check routines at https://www.libcrc.org/ + It defines the ___CRC##_TABLE___ symbol at the start of the table. + The user may choose to add this table to his code instead of using + the linker. + * The linker script syntax has two new commands for inserting text into output sections: ASCII () "string" -- 2.34.1