public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [RFC v0 0/1] Add support for CRC64 generation in linker
@ 2023-02-16 20:40 binutils
  2023-02-16 20:40 ` [PATCH v0 1/6] CRC64 header binutils
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: binutils @ 2023-02-16 20:40 UTC (permalink / raw)
  To: binutils; +Cc: nickc

Cleaned up attempt to generate CRC64.


Added code in lang_end() to calculate the CRC.
So far, I can retrieve the location of the CRC
and the start and end for the area.
I can fetch the .text segment as an asection but
 
  if ( bfd_get_section_contents (link_info.output_bfd,
	  ts,
	  text_section,
	  0,
	  ts->size))

fails...

The patchset should contain the LICENSE and the testsuite
but git-send-email does not like if I send 8 patches.
Sending 6 patches is OK for some reason...

[PATCH v0 1/6] CRC64 header
[PATCH v0 2/6] ldlang.h: CRC64
[PATCH v0 3/6] ldlex.l: CRC64
[PATCH v0 4/6] ldgram.y: CRC64
[PATCH v0 5/6] ldlang.c: CRC64
[PATCH v0 6/6] ldlang.c: Try to get the .text section for checking


^ permalink raw reply	[flat|nested] 18+ messages in thread
* [RFC v0 0/1] Add support for CRC64 generation in linker
@ 2023-02-16 13:19 binutils
  2023-02-16 13:21 ` Ulf Samuelsson
  0 siblings, 1 reply; 18+ messages in thread
From: binutils @ 2023-02-16 13:19 UTC (permalink / raw)
  To: binutils; +Cc: nickc

Here is the first draft of introducing CRC64 generation in the linker

So far it
* reserves room for the CRC (8 bytes)
* Declares a symbol ___CRC64___ for the address of the CRC.
* Allows specifying the polynom (ECMA, ISO or your own)
* Allows for inversion in the CRC calculation (CRC64-WE)
* Allows specifying the area that should be checked.
* Declares the symbol "___CRC64_START__" for the beginning
* Declares the symbol "___CRC64_END__"   for the end (not included)
* Creates a 2kB table which speeds up the CRC calculation
* Can insert the 2kB table into the .text section

It does not yet calculate the CRC of the specified area.
I need to figure out how to access the section(s) covered
for calculating the CRC (between ___CRC64_START___ and ___CRC64_END___)
and then insert the calculated CRC at ___CRC64___ before
the output is generated.

[PATCH v0 1/1] [RFC] Add support for CRC64 generation in linker


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-03-06 10:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 20:40 [RFC v0 0/1] Add support for CRC64 generation in linker binutils
2023-02-16 20:40 ` [PATCH v0 1/6] CRC64 header binutils
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
  -- strict thread matches above, loose matches on Subject: below --
2023-02-16 13:19 binutils
2023-02-16 13:21 ` Ulf Samuelsson

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).