linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CRC calculation in Module.symvers
@ 2011-09-07  5:58 Shakthi Kannan
  2011-09-07 12:54 ` Michal Marek
  2011-09-07 22:46 ` Paul E. McKenney
  0 siblings, 2 replies; 6+ messages in thread
From: Shakthi Kannan @ 2011-09-07  5:58 UTC (permalink / raw)
  To: linux-kernel

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"
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

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

end of thread, other threads:[~2011-09-10  2:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).