From: Michal Marek <mmarek@suse.cz>
To: Shakthi Kannan <shakthimaan@gmail.com>
Cc: linux-kernel@[209.132.180.67]
Subject: Re: CRC calculation in Module.symvers
Date: Wed, 07 Sep 2011 14:54:54 +0200 [thread overview]
Message-ID: <4E67699E.80208@suse.cz> (raw)
In-Reply-To: <CABG-yt0t0sgAvcDDLhjyNFGpY22tL0CtDvXV9+CxYJMf0MdVfA@mail.gmail.com>
On 7.9.2011 07:58, Shakthi Kannan wrote:
> 1. How the CRC is computed for an exported symbol present in
> Module.symvers file, and
The symbol type is recursively expanded and a checksum is computed from
the expanded
> 2. Given a kernel .c file, how can I obtain the CRC checksums for a symbol.
>
> For linux-3.0.2 (example), I compiled with CONFIG_MODVERSIONS=y, and
> running 'make' built vmlinux, and generated the Module.symvers file. I
> believe genksyms is used to create the Module.symvers file?
>
> I had referred the "Kernel Symbols and CONFIG_MODVERSIONS"
> documentation [1] written by Mark McLoughlin. I tried the following in
> the top-level kernel sources:
>
> $ gcc -E -D__GENKSYMS__ -DCONFIG_MODVERSIONS -DEXPORT_SYMTAB
> crypto/api.c -I/tmp/linux-3.0.2/include
> -I/tmp/linux-3.0.2/arch/x86/include | ./scripts/genksyms/genksyms
You need at least -include include/generated/autoconf.h, but the easies
would be
$ make V=1 crypto/api.symtypes
this will generate a file with the symbol expansions. And if you copy
the commandline without the >/dev/null redirection, you'll see the
calculated checksums on standard output.
Michal
next prev parent reply other threads:[~2011-09-07 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 5:58 CRC calculation in Module.symvers Shakthi Kannan
2011-09-07 12:54 ` Michal Marek [this message]
2011-09-09 4:50 ` Shakthi Kannan
2011-09-09 13:17 ` Michal Marek
2011-09-10 2:55 ` Shakthi Kannan
2011-09-07 22:46 ` Paul E. McKenney
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=4E67699E.80208@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kernel@[209.132.180.67] \
--cc=shakthimaan@gmail.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 NNTP newsgroup(s).