public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: binutils@emagii.com
To: binutils@sourceware.org
Cc: nickc@redhat.com, Ulf Samuelsson <binutils@emagii.com>
Subject: [PATCH v0 1/6] CRC64 header
Date: Thu, 16 Feb 2023 21:40:01 +0100	[thread overview]
Message-ID: <20230216204006.1977-2-binutils@emagii.com> (raw)
In-Reply-To: <20230216204006.1977-1-binutils@emagii.com>

From: Ulf Samuelsson <binutils@emagii.com>

Signed-off-by: Ulf Samuelsson <binutils@emagii.com>
---
 ld/checksum.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100755 ld/checksum.h

diff --git a/ld/checksum.h b/ld/checksum.h
new file mode 100755
index 00000000000..49a2aedd04b
--- /dev/null
+++ b/ld/checksum.h
@@ -0,0 +1,48 @@
+/*
+ * Library: libcrc
+ * 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.
+ *
+ */
+
+#ifndef CHECKSUM_H
+#define CHECKSUM_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+#define		CRC_POLY_64			0x42F0E1EBA9EA3693ull
+#define		CRC_POLY_64_ISO		0xD800000000000000ull
+
+#define		CRC_START_64		0x0000000000000000ull
+#define		CRC_START_64_INV	0xFFFFFFFFFFFFFFFFull
+
+#define	CRC_ADDRESS	"___CRC64___"
+#define	CRC_START	"___CRC64_START___"
+#define	CRC_END		"___CRC64_END___"
+
+bfd_vma	crc_64    (const unsigned char *input_str, size_t num_bytes);
+bfd_vma	crc_64_inv(const unsigned char *input_str, size_t num_bytes);
+
+#endif /* CHECKSUM_H */
-- 
2.17.1


  reply	other threads:[~2023-02-16 20:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 20:40 [RFC v0 0/1] Add support for CRC64 generation in linker binutils
2023-02-16 20:40 ` binutils [this message]
2023-02-16 20:40 ` [PATCH v0 2/6] ldlang.h: CRC64 binutils
2023-02-16 20:40 ` [PATCH v0 3/6] ldlex.l: CRC64 binutils
2023-02-16 20:40 ` [PATCH v0 4/6] ldgram.y: CRC64 binutils
2023-02-16 20:40 ` [PATCH v0 5/6] ldlang.c: CRC64 binutils
2023-02-16 20:40 ` [PATCH v0 6/6] ldlang.c: Try to get the .text section for checking CRC binutils
2023-02-16 21:30 ` [RFC v0 0/1] Add support for CRC64 generation in linker Fangrui Song
     [not found] ` <DS7PR12MB57657A0E46493FAAA203AF77CBA09@DS7PR12MB5765.namprd12.prod.outlook.com>
2023-02-16 22:37   ` Ulf Samuelsson
2023-02-17 11:11     ` Nick Clifton
2023-02-17 12:03       ` Ulf Samuelsson
2023-03-06  7:50         ` Fangrui Song
     [not found]         ` <DS7PR12MB57654E11983392D5DCBF1D85CBB69@DS7PR12MB5765.namprd12.prod.outlook.com>
2023-03-06 10:00           ` Ulf Samuelsson
2023-02-17  7:53 ` Ulf Samuelsson
2023-02-17 10:55   ` Nick Clifton
     [not found] ` <DS7PR12MB5765096101240054A648F8C9CBA09@DS7PR12MB5765.namprd12.prod.outlook.com>
2023-02-17 10:46   ` Nick Clifton

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=20230216204006.1977-2-binutils@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).