mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: davidm@hpl.hp.com, linux-kernel@vger.kernel.org
Subject: Re: size of CRCs in module versions
Date: Tue, 15 Apr 2003 23:25:15 -0700	[thread overview]
Message-ID: <16028.63307.771533.129067@napali.hpl.hp.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0304160037130.4255-100000@chaos.physics.uiowa.edu>

>>>>> On Wed, 16 Apr 2003 00:43:06 -0500 (CDT), Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> said:

  Kai> You're right that 32 bits would be enough to hold the
  Kai> CRC. However, we do not yet know the checksum at compile time,
  Kai> so the trick I came up with is to use the linker to fill in the
  Kai> crcs afterwards, using assignment to absolute values. So while
  Kai> the crcs appear to be numbers to the C code, they are handled
  Kai> like addresses from the linker side, and things would most
  Kai> likely go badly wrong if the sizes aren't equal, though I have
  Kai> to admit I didn't try.

Yes, it's not easy (possible) to do it in C, but I suspect most 64-bit
assemblers/linkers can do it.  For example, on ia64, you can do:

	.global foo

	data4 foo

Which will yield a DIR32LSB relocation (32-bit direct value), which is
exactly what we'd need here.

	--david

  reply	other threads:[~2003-04-16  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-16  0:25 David Mosberger
2003-04-16  5:43 ` Kai Germaschewski
2003-04-16  6:25   ` David Mosberger [this message]
2003-04-16 15:44     ` Kai Germaschewski

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=16028.63307.771533.129067@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=davidm@hpl.hp.com \
    --cc=kai@tp1.ruhr-uni-bochum.de \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®