All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Shakthi Kannan <shakthimaan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: CRC calculation in Module.symvers
Date: Wed, 7 Sep 2011 15:46:32 -0700	[thread overview]
Message-ID: <20110907224632.GE4387@linux.vnet.ibm.com> (raw)
In-Reply-To: <CABG-yt0t0sgAvcDDLhjyNFGpY22tL0CtDvXV9+CxYJMf0MdVfA@mail.gmail.com>

On Wed, Sep 07, 2011 at 11:28:46AM +0530, Shakthi Kannan wrote:
> Greetings!
> 
> I would like to know as to:
> 
> 1. How the CRC is computed for an exported symbol present in
> Module.symvers file, and
> 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
> 
> and I get the following error output:
> 
> === Output ===
> 
> /tmp/linux-3.0.2/include/linux/jiffies.h:43:42: error: division by zero in #if
> In file included from /tmp/linux-3.0.2/include/linux/tracepoint.h:19:0,
>                 from /tmp/linux-3.0.2/include/linux/module.h:18,
>                 from crypto/api.c:22:
> /tmp/linux-3.0.2/include/linux/rcupdate.h:160:2: error: #error
> "Unknown RCU implementation specified to kernel configuration"

The above error message is emitted if none of CONFIG_TINY_RCU,
CONFIG_TINY_PREEMPT_RCU, CONFIG_TREE_RCU, and CONFIG_TREE_PREEMPT_RCU
is defined.  Given that these four are in a "choice", I suspect that
you have broken the kernel build pretty impressively.

							Thanx, Paul

> In file included from /tmp/linux-3.0.2/include/linux/module.h:21:0,
>                 from crypto/api.c:22:
> /tmp/linux-3.0.2/arch/x86/include/asm/module.h:59:2: error: #error
> unknown processor family
> 
> === End ===
> 
> The documentation for genksyms is old, and now there is no -k option?
> 
> Appreciate any inputs in this regard,
> 
> Thanks!
> 
> SK
> 
> [1] Kernel Symbols and CONFIG_MODVERSIONS.
> http://www.skynet.ie/~mark/pub/symbols.txt
> 
> -- 
> Shakthi Kannan
> http://www.shakthimaan.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2011-09-07 22:46 UTC|newest]

Thread overview: 7+ 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
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-06  7:11 Shakthi Kannan

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=20110907224632.GE4387@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.