table of contents
| KSYMTYPES(1) | General Commands Manual | KSYMTYPES(1) |
NAME¶
ksymtypes - a tool to work with Linux-kernel symtypes files
SYNOPSIS¶
ksymtypes [GENERAL-OPTION...] {consolidate | split | compare } [COMMAND-OPTION...] ...
DESCRIPTION¶
ksymtypes is a tool that provides functionality to work with symtypes files. These files describe the Application Binary Interface (ABI) of the kernel and its modules. The data is produced by genksyms utilities from the kernel tree.
The tool primarily operates with sets of symtypes files as they are produced during a single build of the Linux kernel. Each such set describes the ABI of a specific kernel and its modules. The tool refers to this set as a "symtypes corpus".
The provided functionality is divided into integrated commands. The currently available commands are consolidate, split and compare. The consolidate command takes a symtypes corpus composed of a set of symtypes files and produces its consolidated variant by merging duplicated types. The split takes a consolidated symtypes file and divides it into individual files. The compare command shows the differences between two symtypes corpuses, which can be either in split or consolidated form.
GENERAL OPTIONS¶
- -d, --debug
- Enable debug output.
- -h, --help
- Display global help information and exit.
- --version
- Output version information and exit.
CONSOLIDATE COMMAND¶
ksymtypes consolidate [CONSOLIDATE-OPTION...] PATH
The consolidate command reads symtypes files from the specified path, consolidates their contents by merging duplicate types and writes the output to the specified file. The input path should point to a directory that the command recursively searches for all symtypes files. In a typical use case, this will be a build directory of the Linux kernel.
Available options:
- -h, --help
- Display help information for the command and exit.
- -j NUM, --jobs=NUM
- Use NUM workers to perform the operation simultaneously.
- -o FILE, --output=FILE
- Write the result to FILE. This option is mandatory.
SPLIT COMMAND¶
ksymtypes split [SPLIT-OPTION...] PATH
The split command reads a consolidated symtypes files from the specified path and divides the data into individual symtypes files. This operation is the opposite of the consolidate command.
Note that consolidating and then splitting symtypes data might not produce output that is exactly the same as the original due to potential differences in the ordering of records.
Available options:
- -h, --help
- Display help information for the command and exit.
- -j NUM, --jobs=NUM
- Use NUM workers to perform the operation simultaneously.
- -o DIR, --output=DIR
- Write the result to DIR. This option is mandatory.
COMPARE COMMAND¶
ksymtypes compare [COMPARE-OPTION...] PATH PATH2
The compare command shows the differences between two symtypes corpuses. A corpus can be specified by a directory containing symtypes files or by a consolidated symtypes file. In a typical use case, the first input will point to a reference consolidated symtypes corpus and the second input will point to data from a new build of the Linux kernel.
Available options:
- -h, --help
- Display help information for the command and exit.
- -j NUM, --jobs=NUM
- Use NUM workers to perform the operation simultaneously.
- --filter-symbol-list=FILE
- Consider only symbols that match the patterns in FILE.
EXAMPLES¶
Build the Linux kernel and obtain a reference symvers and consolidated symtypes corpus:
-
$ cd <linux-kernel-directory> $ make O=build ... $ cp build/Module.symvers base.symvers $ ksymtypes consolidate --output=base.symtypes build/
Build a new version of the Linux kernel and compare its ABI with the previous reference:
-
$ cd <linux-kernel-directory> $ vim ... # edit the code $ make O=build ... $ ksymvers compare --format=symbols:changed-exports base.symvers build/Module.symvers $ ksymtypes compare --filter-symbol-list=changed-exports base.symtypes build/