genksyms8
Generate symbol version information
Usage
genksyms [-wq]
[-dD]
[-V]
[-k
version]
[-p
string]
[output
directory]
Overview
Genksyms reads (on standard input) the output from "gcc -E source.c" and generates a file containing version information.
Depending on the output format indicated by the -k option, the output will either be written to a .ver file in the named output directory, or to the standard output.
Genksyms normally looks for explicit symbol table definitions in the source file. All definitions and declarations of typedef, struct, union and enum will be saved for later expansion. Every global symbol will also be saved, together with pointers that will enable a full expansion later on.
When a symbol table is found in the source, the symbol will be expanded to its full definition, where all structs, unions, enums and typedefs will be expanded down to their basic part, recursively. This final string will then be used as input to a CRC algorithm that will give an integer that will change as soon as any of the included definitions changes, for this symbol.
The version information in the kernel normally looks like: symbol_R12345678, where 12345678 is the hexadecimal representation of the CRC.
Options
-
-d, --debug -
Output debugging information; repeating this option increases the verbosity. Debug level 1 generates moderate information about the actions being taken; debug level 2 enables parser recognition output; debug level 3 enables lexical analysis output.
-
-D, --dump -
Dump expanded symbol definitions to stderr. For debugging use only.
-
-h, --help -
Display a summary of options and immediately exit.
-
-k version, --kernel version -
Select the version of the kernel for which to generate output. Omitting this option assumes a version below 2.1.0. Versions below 2.1.18 use checksum version 1, and produce their output in the directory given on the command line. Versions 2.1.18 and above use checksum version 2 and produce their output on stdout.
-
-p string, --prefix string -
Prepend the given string to the CRCs generated for all symbols. This is intended for use with, e.g., SMP kernels, wherein the modules are not compatible at a level below that described by the data types. This is primarily caused by inline function expansions in the module code itself.
-
-q, --quiet -
Quiet warnings, i.e. reverse the
-woption.
-
-V, --version -
Display the version of
genksyms.
-
-w, --warnings -
Enable warnings due to unrecognized syntax and declared but undefined structures. These warnings are normally suppressed.
Releases
9 releases since Debian 1.1 (Buzz); the text changed 5 times.
--debug since Debian 3.0 (Woody);
--dump since Debian 3.0 (Woody);
--help since Debian 3.0 (Woody);
--kernel since Debian 3.0 (Woody);
--prefix since Debian 3.0 (Woody);
--quiet since Debian 3.0 (Woody);
--version since Debian 3.0 (Woody);
--warnings since Debian 3.0 (Woody);
-V since Debian 3.0 (Woody);
-h since Debian 3.0 (Woody);
-k since Debian 2.0 (Hamm);
-p since Debian 2.0 (Hamm).
-g until Debian 1.3 (Bo).