Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

genksyms(8) [redhat man page]

GENKSYMS(8)						       Linux Module Support						       GENKSYMS(8)

NAME
genksyms - generate symbol version information SYNOPSIS
genksyms [-wq] [-dD] [-V] [-k version] [-p string] [output directory] DESCRIPTION
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 type- def, 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 type- defs 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 mod- ules 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 -w option. -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. SEE ALSO
insmod(8), modprobe(8) BUGS
The -h option is broken; --help is fine. genksyms [-V | --version] should display version information and then exit immediately. Instead, it prints the version information and behaves as if no options were given. HISTORY
This versioning concept is a result from discussions, not at least on the KERNEL-channel, with a lot of people. The genksyms utility was created in 1994 by Bjorn Ekwall <bj0rn@blox.se> being mostly inspired by Jacques Gelinas <jack@solucorp.ca> and Jeremy Fitzhardinge <jeremy@suite.sw.oz.au> It was rewritten in 1996 by Richard Henderson to use a proper lexer and parser. Linux January 30, 2002 GENKSYMS(8)

Check Out this Related Man Page

STRIP(1)						    BSD General Commands Manual 						  STRIP(1)

NAME
strip -- discard information from ELF objects SYNOPSIS
strip [-d | -g | -S | --strip-debug] [-h | --help] [--only-keep-debug] [-o outputfile | --output-file=outputfile] [-p | --preserve-dates] [-s | --strip-all] [--strip-unneeded] [-w | --wildcard] [-x | --discard-all] [-I format | --input-target=format] [-K symbol | --keep-symbol=symbol] [-N symbol | --strip-symbol=symbol] [-O format | --output-target=format] [-R sectionname | --remove-section=sectionname] [-V | --version] [-X | --discard-locals] file ... DESCRIPTION
The strip utility is used to discard information from ELF objects. The strip utility supports the following options: -d | -g | -S | --strip-debug Remove debugging symbols only. -h | --help Print a help message and exit. --only-keep-debug Remove all content except that which would be used for debugging. -o outputfile | --output-file=outputfile Write the stripped object to file outputfile. The default behaviour is to modify objects in place. -p | --preserve-dates Preserve the object's access and modification times. -s | --strip-all Remove all symbols. --strip-unneeded Remove all symbols not needed for further relocation processing. -w | --wildcard Use shell-style patterns to name symbols. The following meta-characters are recognized in patterns: ! If this is the first character of the pattern, invert the sense of the pattern match. * Matches any string of characters in a symbol name. ? Matches zero or one character in a symbol name. [ Mark the start of a character class. Remove the special meaning of the next character in the pattern. ] Mark the end of a character class. -x | --discard-all Discard all non-global symbols. -I format | --input-target=format These options are accepted, but are ignored. -K symbol | --keep-symbol=symbol Keep the symbol symbol even if it would otherwise be stripped. This option may be specified multiple times. -N symbol | --strip-symbol=symbol Remove the symbol symbol even if it would otherwise have been kept. This option may be specified multiple times. -O format | --output-target=format Set the output file format to format. For the full list of supported formats, please see the documentation for function elftc_bfd_find_target(3). -R sectionname | --remove-section=sectionname Remove the section named by the argument sectionname. This option may be specified multiple times. -V | --version Print a version identifier and exit. -X | --discard-locals Remove compiler-generated local symbols. DIAGNOSTICS
The strip utility exits 0 on success, and >0 if an error occurs. SEE ALSO
ar(1), elfcopy(1), ld(1), mcs(1), elf(3), elftc_bfd_find_target(3), fnmatch(3) BSD
September 17, 2011 BSD
Man Page