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

pvs(1)                                                             User Commands                                                            pvs(1)

NAME
pvs - display the internal version information of dynamic objects SYNOPSIS
pvs [-Cdlnorsv] [-N name] file... DESCRIPTION
The pvs utility displays any internal version information contained within an ELF file. Commonly, these files are dynamic executables and shared objects, and possibly relocatable objects. This version information can fall into one of two categories: o version definitions o version dependencies Version definitions describe the interfaces that are made available by an ELF file. Each version definition is associated to a set of global symbols provided by the file. Version definitions can be assigned to a file during its creation by the link-editor using the -M option and the associated mapfile directives. See the Linker and Libraries Guide for more details. Version dependencies describe the binding requirements of dynamic objects on the version definitions of any shared object dependencies. When a dynamic object is built with a shared object, the link-editor records information within the dynamic object indicating that the shared object is a dependency. This dependency must be satisfied at runtime. If the shared object also contains version definitions, then those version definitions that satisfy the global symbol requirements of the dynamic object are also recorded in the dynamic object being created. At process initialization, the runtime linker uses any version dependencies as a means of validating the interface requirements of the dynamic objects used to construct the process. OPTIONS
The following options are supported. If neither the -d or -r options are specified, both are enabled. -C Demangles C++ symbol names. -d Prints version definition information. -l When used with the -s option, prints any symbols that have been reduced from global to local binding due to versioning. By conven- tion, these symbol entries are located in the .symtab section, and fall between the FILE symbol representing the output file, and the FILE symbol representing the first input file used to generate the output file. These reduced symbol entries are assigned the fabricated version definition _REDUCED_. No reduced symbols will be printed if the file has been stripped (see strip(1)), or if the symbol entry convention cannot be determined. -n Normalizes version definition information. By default, all version definitions within the object are displayed. However, version definitions can inherit other version definitions. Under normalization, only the head of each inheritance list is displayed. -N name When used with the -d option, -N prints only the information for the given version definition name and any of its inherited ver- sion definitions. When used with the -r option, -N prints only the information for the given dependency file name. -o Creates one-line version definition output. By default, file, version definitions, and any symbol output is indented to ease human inspection. This option prefixes each output line with the file and version definition name and can be more useful for analysis with automated tools. -r Prints version dependency (requirements) information. -s Prints the symbols associated with each version definition. Any data symbols are accompanied with the size, in bytes, of the data item. -v Verbose output. Indicates any weak version definitions, and any version definition inheritance. When used with the -N and -d options, the inheritance of the base version definition is also shown. When used with the -s option, the version symbol definition is also shown. OPERANDS
The following operands are supported. file The ELF file about which internal version information is displayed. EXAMPLES
Example 1: Displaying version definitions The following example displays the version definitions of libelf.so.1: % pvs -d /lib/libelf.so.1 libelf.so.1; SUNW_1.1 Example 2: Creating a one-liner display A normalized, one-liner display, suitable for creating a mapfile version control directive, can be created using the -n and -o options: % pvs -don /lib/libelf.so.1 /lib/libelf.so.1 - SUNW_1.1; Example 3: Displaying version requirements The following example displays the version requirements of ldd and pvs: % pvs -r /usr/bin/ldd /usr/bin/pvs /usr/bin/ldd: libelf.so.1 (SUNW_1.1); libc.so.1 (SUNW_1.1); /usr/bin/pvs: libelf.so.1 (SUNW_1.1); libc.so.1 (SUNW_1.1); EXIT STATUS
If the requested version information is not found, a non-zero value is returned. Otherwise, a 0 value is returned. Version information is determined not found when any of the following is true: o the -d option is specified and no version definitions are found. o the -r option is specified and no version requirements are found. o neither the -d nor -r option is specified and no version definitions or version requirements are found. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtoo | +-----------------------------+-----------------------------+ SEE ALSO
ld(1), ldd(1), strip(1), elf(3ELF), attributes(5) Linker and Libraries Guide SunOS 5.10 14 Apr 2004 pvs(1)
Man Page