.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .TH ABI-COMPLIANCE-CHECKER "1" "February 2023" "ABI Compliance Checker (ABICC) 2.3" "User Commands" .SH NAME abi-compliance-checker \- tool to compare ABI compatibility of shared C/C++ library versions .SH DESCRIPTION .SS "NAME:" .IP ABI Compliance Checker (abi\-compliance\-checker) Check backward compatibility of a C/C++ library API .SS "DESCRIPTION:" .IP ABI Compliance Checker (ABICC) is a tool for checking backward binary compatibility and backward source compatibility of a C/C++ library API. .IP The tool analyzes changes in API and ABI (ABI=API+compiler ABI) that may break binary compatibility and/or source compatibility: changes in calling stack, v\-table changes, removed symbols, renamed fields, etc. .IP Binary incompatibility may result in crashing or incorrect behavior of applications built with an old version of a library if they run on a new one. Source incompatibility may result in recompilation errors with a new library version. .IP The tool can create and compare ABI dumps for header files and shared objects of a library. The ABI dump for a library can also be created by the ABI Dumper tool (https://github.com/lvc/abi\-dumper) if shared objects include debug\-info. .IP The tool is intended for developers of software libraries and maintainers of operating systems who are interested in ensuring backward compatibility, i.e. allow old applications to run or to be recompiled with newer library versions. .IP Also the tool can be used by ISVs for checking applications portability to new library versions. Found issues can be taken into account when adapting the application to a new library version. .IP This tool is free software: you can redistribute it and/or modify it under the terms of the GNU LGPL 2.1. .PP USAGE #1 (WITH ABI DUMPER): .IP 1. Library should be compiled with "\-g \fB\-Og\fR" GCC options .IP to contain DWARF debug info .IP 2. Create ABI dumps for both library versions .IP using the ABI Dumper (https://github.com/lvc/abi\-dumper) tool: .IP abi\-dumper OLD.so \fB\-o\fR ABI\-0.dump \fB\-lver\fR 0 abi\-dumper NEW.so \fB\-o\fR ABI\-1.dump \fB\-lver\fR 1 .IP 3. You can filter public ABI with the help of .IP additional \fB\-public\-headers\fR option of the ABI Dumper tool. .IP 4. Compare ABI dumps to create report: .IP abi\-compliance\-checker \fB\-l\fR NAME \fB\-old\fR ABI\-0.dump \fB\-new\fR ABI\-1.dump .PP USAGE #2 (ORIGINAL): .IP 1. Create XML\-descriptors for two versions .IP of a library (OLD.xml and NEW.xml): .IP .IP 1.0 .IP .IP .IP /path/to/headers/ .IP .IP .IP /path/to/libraries/ .IP .IP 2. Compare Xml\-descriptors to create report: .IP abi\-compliance\-checker \fB\-lib\fR NAME \fB\-old\fR OLD.xml \fB\-new\fR NEW.xml .PP USAGE #3 (CREATE ABI DUMPS): .IP 1. Create XML\-descriptors for two versions .IP of a library (OLD.xml and NEW.xml): .IP .IP 1.0 .IP .IP .IP /path/to/headers/ .IP .IP .IP /path/to/libraries/ .IP .IP 2. Create ABI dumps: .IP abi\-compliance\-checker \fB\-lib\fR NAME \fB\-dump\fR OLD.xml \fB\-dump\-path\fR ./ABI\-0.dump abi\-compliance\-checker \fB\-lib\fR NAME \fB\-dump\fR NEW.xml \fB\-dump\-path\fR ./ABI\-1.dump .IP 3. Compare ABI dumps to create report: .IP abi\-compliance\-checker \fB\-l\fR NAME \fB\-old\fR ABI\-0.dump \fB\-new\fR ABI\-1.dump .SS "INFO OPTIONS:" .HP \fB\-h\fR|\-help .IP Print this help. .HP \fB\-i\fR|\-info .IP Print complete info including all options. .HP \fB\-v\fR|\-version .IP Print version information. .HP \fB\-dumpversion\fR .IP Print the tool version (2.3) and don't do anything else. .SS "GENERAL OPTIONS:" .HP \fB\-l\fR|\-library NAME .IP Any name of the library. .HP \fB\-old\fR|\-d1 PATH .IP Descriptor of the 1st (old) library version. It may be one of the following: .IP 1. ABI dump generated by the ABI Dumper tool 2. XML\-descriptor (*.xml file): .IP .IP 1.0 .IP .IP .IP /path1/to/header(s)/ /path2/to/header(s)/ .IP \&... .IP .IP .IP /path1/to/library(ies)/ /path2/to/library(ies)/ .IP \&... .IP .IP \&... .IP 3. ABI dump generated by \fB\-dump\fR option 4. Directory with headers and libraries 5. Single header file .IP If you are using 4\-5 descriptor types then you should specify version numbers with \fB\-v1\fR and \fB\-v2\fR options. .IP For more information, please see: .IP https://lvc.github.io/abi\-compliance\-checker/Xml\-Descriptor.html .HP \fB\-new\fR|\-d2 PATH .IP Descriptor of the 2nd (new) library version. .HP \fB\-dump\fR PATH .IP Create library ABI dump for the input XML descriptor. You can transfer it anywhere and pass instead of the descriptor. Also it can be used for debugging the tool. .HP \fB\-filter\fR PATH .IP A path to XML descriptor with skip_* rules to filter analyzed symbols in the report. .SS "EXTRA OPTIONS:" .HP \fB\-debug\fR .IP Debugging mode. Print debug info on the screen. Save intermediate analysis stages in the debug directory: .IP debug/LIB_NAME/VERSION/ .IP Also consider using \fB\-dump\fR option for debugging the tool. .HP \fB\-ext\fR|\-extended .IP If your library A is supposed to be used by other library B and you want to control the ABI of B, then you should enable this option. The tool will check for changes in all data types, even if they are not used by any function in the library A. Such data types are not part of the A library ABI, but may be a part of the ABI of the B library. .IP The short scheme is: .IP app C (broken) \-> lib B (broken ABI) \-> lib A (stable ABI) .HP \fB\-static\fR .IP Check static libraries instead of the shared ones. The section of the XML\-descriptor should point to static libraries location. .HP \fB\-gcc\-path\fR PATH .IP Path to the cross GCC compiler to use instead of the usual (host) GCC. .HP \fB\-gcc\-prefix\fR PREFIX .IP GCC toolchain prefix. .HP \fB\-gcc\-options\fR OPTS .IP Additional compiler options. .HP \fB\-count\-symbols\fR PATH .IP Count total public symbols in the ABI dump. .HP \fB\-use\-dumps\fR .IP Make dumps for two versions of a library and compare dumps. This should increase the performance of the tool and decrease the system memory usage. .HP \fB\-xml\fR .IP Alias for: \fB\-\-report\-format\fR=\fI\,xml\/\fR or \fB\-\-dump\-format\fR=\fI\,xml\/\fR .HP \fB\-app\fR|\-application PATH .IP This option allows one to specify the application that should be checked for portability to the new library version. .HP \fB\-headers\-only\fR .IP Check header files without libraries. It is easy to run, but may provide a low quality compatibility report with false positives and without detecting of added/removed symbols. .HP \fB\-v1\fR|\-vnum1 NUM .IP Specify 1st library version outside the descriptor. This option is needed if you have preferred an alternative descriptor type (see \fB\-d1\fR option). .IP In general case you should specify it in the XML\-descriptor: .IP .IP VERSION .IP .HP \fB\-v2\fR|\-vnum2 NUM .IP Specify 2nd library version outside the descriptor. .HP \fB\-relpath1\fR PATH .IP Replace {RELPATH} macros to PATH in the 1st XML\-descriptor (\fB\-d1\fR). .HP \fB\-relpath2\fR PATH .IP Replace {RELPATH} macros to PATH in the 2nd XML\-descriptor (\fB\-d2\fR). .SS "TEST OPTIONS:" .HP \fB\-test\fR .IP Run internal tests. Create two binary incompatible versions of a sample library and run the tool to check them for compatibility. This option allows one to check if the tool works correctly in the current environment. .HP \fB\-test\-dump\fR .IP Test ability to create, read and compare ABI dumps. .HP \fB\-test\-abi\-dumper\fR .IP Compare ABI dumps created by the ABI Dumper tool. .SS "REPORT OPTIONS:" .HP \fB\-binary\fR|\-bin|\-abi .IP Show binary compatibility problems only. Generate report to: .IP compat_reports/LIB_NAME/V1_to_V2/abi_compat_report.html .HP \fB\-source\fR|\-src|\-api .IP Show source compatibility problems only. Generate report to: .IP compat_reports/LIB_NAME/V1_to_V2/src_compat_report.html .HP \fB\-s\fR|\-strict .IP Treat all compatibility warnings as problems. Add a number of "Low" severity problems to the return value of the tool. .SS "REPORT PATH OPTIONS:" .HP \fB\-report\-path\fR PATH .IP Path to compatibility report. Default: .IP compat_reports/LIB_NAME/V1_to_V2/compat_report.html .HP \fB\-bin\-report\-path\fR PATH .IP Path to binary compatibility report. Default: .IP compat_reports/LIB_NAME/V1_to_V2/abi_compat_report.html .HP \fB\-src\-report\-path\fR PATH .IP Path to source compatibility report. Default: .IP compat_reports/LIB_NAME/V1_to_V2/src_compat_report.html .SS "REPORT FORMAT OPTIONS:" .HP \fB\-show\-retval\fR .IP Show the symbol's return type in the report. .HP \fB\-stdout\fR .IP Print analysis results (compatibility reports and ABI dumps) to stdout instead of creating a file. This would allow piping data to other programs. .HP \fB\-report\-format\fR FMT .IP Change format of compatibility report. Formats: .IP htm \- HTML format (default) xml \- XML format .HP \fB\-old\-style\fR .IP Generate old\-style report. .HP \fB\-title\fR NAME .IP Change library name in the report title to NAME. By default will be displayed a name specified by \fB\-l\fR option. .HP \fB\-component\fR NAME .IP The component name in the title and summary of the HTML report. Default: .IP library .HP \fB\-p\fR|\-params PATH .IP Path to file with the function parameter names. It can be used for improving report view if the library header files have no parameter names. File format: .IP func1;param1;param2;param3 ... func2;param1;param2;param3 ... .IP \&... .HP \fB\-limit\-affected\fR LIMIT .IP The maximum number of affected symbols listed under the description of the changed type in the report. .HP \fB\-list\-affected\fR .IP Generate file with the list of incompatible symbols beside the HTML compatibility report. Use 'c++filt @file' command from GNU binutils to unmangle C++ symbols in the generated file. Default names: .IP abi_affected.txt src_affected.txt .SS "ABI DUMP OPTIONS:" .HP \fB\-dump\-path\fR PATH .IP Specify a *.dump file path where to generate an ABI dump. Default: .IP abi_dumps/LIB_NAME/VERSION/ABI.dump .HP \fB\-dump\-format\fR FMT .IP Change format of ABI dump. Formats: .IP perl \- Data::Dumper format (default) xml \- XML format .HP \fB\-check\fR .IP Check completeness of the ABI dump. .HP \fB\-extra\-info\fR DIR .IP Dump extra info to DIR. .HP \fB\-extra\-dump\fR .IP Create extended ABI dump containing all symbols from the translation unit. .HP \fB\-relpath\fR PATH .IP Replace {RELPATH} macros to PATH in the XML\-descriptor used for dumping the library ABI (see \fB\-dump\fR option). .HP \fB\-vnum\fR NUM .IP Specify the library version in the generated ABI dump. The section of the input XML descriptor will be overwritten in this case. .HP \fB\-sort\fR .IP Enable sorting of data in ABI dumps. .SS "FILTER SYMBOLS OPTIONS:" .HP \fB\-symbols\-list\fR PATH .IP This option allows one to specify a file with a list of symbols (mangled names in C++) that should be checked. Other symbols will not be checked. .HP \fB\-types\-list\fR PATH .IP This option allows one to specify a file with a list of types that should be checked. Other types will not be checked. .HP \fB\-skip\-symbols\fR PATH .IP The list of symbols that should not be checked. .HP \fB\-skip\-types\fR PATH .IP The list of types that should not be checked. .HP \fB\-skip\-internal\-symbols\fR PATTERN .IP Do not check symbols matched by the regular expression. .HP \fB\-skip\-internal\-types\fR PATTERN .IP Do not check types matched by the regular expression. It's matched against full qualified type names (e.g. 'struct xyz::Name'). It has to match any part of type name. .HP \fB\-keep\-cxx\fR .IP Check _ZS*, _ZNS* and _ZNKS* symbols. .HP \fB\-keep\-reserved\fR .IP Report changes in reserved fields. .SS "FILTER HEADERS OPTIONS:" .HP \fB\-skip\-headers\fR PATH .IP The file with the list of header files, that should not be checked. .HP \fB\-headers\-list\fR PATH .IP The file with a list of headers, that should be checked/dumped. .HP \fB\-header\fR NAME .IP Check/Dump ABI of this header only. .HP \fB\-nostdinc\fR .IP Do not search in GCC standard system directories for header files. .HP \fB\-tolerance\fR LEVEL .IP Apply a set of heuristics to successfully compile input header files. You can enable several tolerance levels by joining them into one string (e.g. 13, 124, etc.). Levels: .IP 1 \- skip non\-Linux headers (e.g. win32_*.h, etc.) 2 \- skip internal headers (e.g. *_p.h, impl/*.h, etc.) 3 \- skip headers that include non\-Linux headers 4 \- skip headers included by others .HP \fB\-tolerant\fR .IP Enable highest tolerance level [1234]. .HP \fB\-skip\-unidentified\fR .IP Skip header files in 'headers' and 'include_preamble' sections of the XML descriptor that cannot be found. This is useful if you are trying to use the same descriptor for different targets. .SS "FILTER RULES OPTIONS:" .HP \fB\-skip\-typedef\-uncover\fR .IP Do not report a problem if type is covered or uncovered by typedef (useful for broken debug info). .HP \fB\-check\-private\-abi\fR .IP Check data types from the private part of the ABI when comparing ABI dumps created by the ABI Dumper tool with use of the \fB\-public\-headers\fR option. .IP Requires ABI Dumper >= 0.99.14 .HP \fB\-disable\-constants\-check\fR .IP Do not check for changes in constants. .HP \fB\-skip\-added\-constants\fR .IP Do not detect added constants. .HP \fB\-skip\-removed\-constants\fR .IP Do not detect removed constants. .SS "OTHER OPTIONS:" .HP \fB\-lang\fR LANG .IP Set library language (C or C++). You can use this option if the tool cannot auto\-detect a language. This option may be useful for checking C\-library headers (\fB\-\-lang\fR=\fI\,C\/\fR) in \fB\-\-headers\-only\fR or \fB\-\-extended\fR modes. .HP \fB\-arch\fR ARCH .IP Set library architecture (x86, x86_64, ia64, arm, ppc32, ppc64, s390, ect.). The option is useful if the tool cannot detect correct architecture of the input objects. .HP \fB\-mingw\-compatible\fR .IP If input header files are compatible with the MinGW GCC compiler, then you can tell the tool about this and speedup the analysis. .HP \fB\-cxx\-incompatible\fR .IP Set this option if input C header files use C++ keywords. The tool will try to replace such keywords at preprocessor stage and replace them back in the final TU dump. .HP \fB\-cpp\-compatible\fR .IP Do nothing. .HP \fB\-quick\fR .IP Quick analysis. Disable check of some template instances. .HP \fB\-force\fR .IP Try to enable this option if the tool checked not all types and symbols in header files. .SS "OS ANALYSIS OPTIONS:" .HP \fB\-dump\-system\fR NAME \fB\-sysroot\fR DIR .IP Find all the shared libraries and header files in DIR directory, create XML descriptors and make ABI dumps for each library. The result set of ABI dumps can be compared (\fB\-\-cmp\-systems\fR) with the other one created for other version of operating system in order to check them for compatibility. Do not forget to specify \fB\-cross\-gcc\fR option if your target system requires some specific version of GCC compiler (different from the host GCC). The system ABI dump will be generated to: .IP sys_dumps/NAME/ARCH .HP \fB\-dump\-system\fR DESCRIPTOR.xml .IP The same as the previous option but takes an XML descriptor of the target system as input, where you should describe it: .IP /* Primary sections */ .IP .IP /* Name of the system */ .IP .IP .IP /* The list of paths to header files and/or .IP directories with header files, one per line */ .IP .IP .IP /* The list of paths to shared libraries and/or .IP directories with shared libraries, one per line */ .IP .IP /* Optional sections */ .IP .IP /* List of directories to be searched .IP for header files to automatically generate include paths, one per line */ .IP .IP .IP /* List of directories to be searched .IP for shared libraries to resolve dependencies, one per line */ .IP .IP .IP /* List of directories with tools used .IP for analysis (GCC toolchain), one per line */ .IP .IP .IP /* GCC toolchain prefix. .TP Examples: arm\-linux\-gnueabi arm\-none\-symbianelf */ .IP .IP .IP /* Additional GCC options, one per line */ .IP .HP \fB\-cmp\-systems\fR \fB\-d1\fR sys_dumps/NAME1/ARCH \fB\-d2\fR sys_dumps/NAME2/ARCH .IP Compare two ABI dumps of a system. Create compatibility reports for each system library and the common HTML report including the summary of test results for all checked libraries. .IP Summary report will be generated to: .IP sys_compat_reports/NAME1_to_NAME2/ARCH .HP \fB\-sysroot\fR DIR .IP Specify the alternative root directory. The tool will search for include paths in the DIR/usr/include and DIR/usr/lib directories. .HP \fB\-sysinfo\fR DIR .IP This option should be used with \fB\-dump\-system\fR option to dump ABI of operating systems and configure the dumping process. .HP \fB\-libs\-list\fR PATH .IP The file with a list of libraries, that should be dumped by the \fB\-dump\-system\fR option or should be checked by the \fB\-cmp\-systems\fR option. .SS "LOGGING OPTIONS:" .HP \fB\-log\-path\fR PATH .IP Log path for all messages. Default: .IP logs/LIB_NAME/VERSION/log.txt .HP \fB\-log1\-path\fR PATH .IP Log path for 1st version of a library. Default: .IP logs/LIB_NAME/V1/log.txt .HP \fB\-log2\-path\fR PATH .IP Log path for 2nd version of a library. Default: .IP logs/LIB_NAME/V2/log.txt .HP \fB\-logging\-mode\fR MODE .IP Change logging mode. Modes: .IP w \- overwrite old logs (default) a \- append old logs n \- do not write any logs .HP \fB\-q\fR|\-quiet .IP Print all messages to the file instead of stdout and stderr. Default path (can be changed by \fB\-log\-path\fR option): .IP logs/run.log .SS "REPORT PATH:" .IP Compatibility report will be generated to: .IP compat_reports/LIB_NAME/V1_to_V2/compat_report.html .SS "LOG PATH:" .IP Log will be generated to: .IP logs/LIB_NAME/V1/log.txt logs/LIB_NAME/V2/log.txt .SS "EXIT CODES:" .IP 0 \- Compatible. The tool has run without any errors. non\-zero \- Incompatible or the tool has run with errors. .SS "MORE INFO:" .IP https://lvc.github.io/abi\-compliance\-checker/ https://github.com/lvc/abi\-compliance\-checker .SH AUTHOR This manual page was written by Mathieu Malaterre for the Debian GNU/Linux system (but may be used by others). .PP Written by Andrey Ponomarenko. .SH COPYRIGHT Copyright \(co 2018 Andrey Ponomarenko's ABI Laboratory License: GNU LGPL 2.1 This program is free software: you can redistribute it and/or modify it.