ABIDIFF(1) Libabigail ABIDIFF(1) (NAME) abidiff - (ABI) ELF abidiff (ABI) ELF . ABI . ABI ELF ( abidw) ELF ELF . ABI abidiff DWARF ( ) CTF BTF ( ) . ELF . libabigail . . . libabigail ( ) (Translation Unit) . (ABI Corpus) ELF (Export) . ABI libabigail ABI . libabigail ABI . (SYNOPSIS) abidiff [] (ENVIRONMENT) abidiff (Suppression) <#suppr-spec- label> ABI . o LIBABIGAIL_DEFAULT_SYSTEM_SUPPRESSION_FILE . abidiff $libdir/libabigail/libabigail-default.abignore . . o LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE . abidiff $HOME/.abignore . . (OPTIONS) o --add-binaries1 --added-binaries-dir1 abidiff ABI ( ABI) abidiff . ABI abidiff . o --add-binaries2 --added-binaries-dir2 abidiff ABI ( ABI) abidiff . ABI abidiff . o --added-binaries-dir1 | --abd1 --add-binaries1 --follow-dependencies --list-dependencies . added-binaries-directory-1 ABI ABI . o --added-binaries-dir2 | --abd2 --add-binaries2 --follow-dependencies --list-dependencies . added-binaries-directory-2 ABI ABI . o --added-fns first-shared-library second-shared-library second-shared-library . o --added-vars first-shared-library second-shared-library second-shared-library () . o --allow-non-exported-interfaces ( ) . ABI ELF . ABI . ( ). . ABI . << >> libabigail . . o --btf ABI BTF ( ) . o --changed-fns first-shared-library second-shared-library first-shared-library . o --changed-vars first-shared-library second-shared-library first-shared-library . o --ctf ABI CTF ( ) . o --debug-info-dir1 | --d1 first-shared-library abidiff . di-path . Red Hat /usr/lib/debug . . abidiff first-shared-library . abidiff . o --debug-info-dir2 | --d2 --debug-info-dir1 abidiff second-shared-library . . abidiff second-shared-library . o --debug-self-comparison (Type Canonicalization) . (Canonical Types) ( ) . (Abort) . . . libabigail --enable-debug-self-comparison . o --debug-tc (Type Canonicalization) . : ( ) (Canonical). . (Abort) . . libabigail --enable-debug-type-canonicalization . o --deleted-fns first-shared-library second-shared-library first-shared-library . o --deleted-vars first-shared-library second-shared-library first-shared-library . o --drop ELF first-shared-library second-shared-library regex ( ). . o --drop-fn ELF first-shared-library second-shared-library regex . . o --drop-var ELF first-shared-library second-shared-library regex . o --drop-private-types --headers-dir1 header-file1 header-file2 --headers-dir2 . Libabigail ABI . ABI Libabigail . . Libabigail . . o --dump-diff-tree (Diff Nodes Tree) (stderr) . . . . o --exported-interfaces-only ( ) . ABI ELF . ABI . ( ). . ABI . libabigail ELF . . o --fail-no-debug-info ( ) . ( ELF) . o --follow-dependencies | --fdeps abidiff --added-binaries-dir1 ABI ( ABI) abidiff . abidiff --added-binaries-dir2 ABI ABI abidiff . ABI . abidiff . o --harmless (Harmless) <# harmlesschangeconcept-label> . ABI . o --headers-dir1 | --hd1 ( ) . ABI . . --headers-dir1 : $ abidiff --headers-dir1 /some/path \ --headers-dir1 /some/other/path \ binary-version-1 binary-version-2 o --headers-dir2 | --hd2 . ABI . . --headers-dir2 : $ abidiff --headers-dir2 /some/path \ --headers-dir2 /some/other/path \ binary-version-1 binary-version-2 o --header-file1 | --hf1 . ABI . o --header-file2 | --hf2 . ABI . o --help | -h . o --ignore-soname SONAME . o --impacted-interfaces (Leaf changes) abidiff . --leaf-changes-only . o --keep ELF first-shared-library second-shared-library regex . . o --keep-fn ELF first-shared-library second-shared-library regex . . o --keep-var ELF first-shared-library second-shared-library regex . . o --kmi-whitelist | -w ELF ABI . << >> (Kernel Module Interface white list KMI) . ABI KMI ABI . ELF . -- -- KMI . o --leaf-changes-only|-l . --redundant . abidiff : $ abidiff libtest-v0.so libtest-v1.so Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C]'function void fn(C&)' at test-v1.cc:13:1 has some indirect sub-type changes: parameter 1 of type 'C&' has sub-type changes: in referenced type 'struct C' at test-v1.cc:7:1: type size hasn't changed 1 data member change: type of 'leaf* C::m0' changed: in pointed to type 'struct leaf' at test-v1.cc:1:1: type size changed from 32 to 64 bits 1 data member insertion: 'char leaf::m1', at offset 32 (in bits) at test-v1.cc:4:1 $ "struct leaf" "void fn(C&)" . "struct leaf" "void fn(C&)" . abidiff "struct leaf" (Leaf Change) . --leaf-changes-only --impacted-interfaces . : $ abidiff -l libtest-v0.so libtest-v1.so 'struct leaf' changed: type size changed from 32 to 64 bits 1 data member insertion: 'char leaf::m1', at offset 32 (in bits) at test-v1.cc:4:1 one impacted interface: function void fn(C&) $ . --impacted-interface . . o --list-dependencies | --ldeps abidiff --added-binaries-dir1 --added-binaries-dir2 . o --no-added-syms first-shared-library second-shared-library . ELF . . o --no-assume-odr-for-cplusplus C++ DWARF libabigail (One Definition Rule ODR) . . libabigail . o --no-architecture (ABI) . o --no-change-categorization | -x (Harmless) (Harmful) . . . --leaf-changes-only . o --no-corpus-path (path attribute) ABI . o --no-default-suppression (Suppression) . o --no-harmful (Harmful) <#harmfulchangeconcept-label> . . o --no-leverage-dwarf-factorization DWARF DWZ . libabigail . . o --no-linkage-name (Linkage Names) . o --no-linux-kernel-mode abidiff ( vmlinux ) ELF __ksymtab __ksymtab_gpl . abidiff ELF ELF . o --no-redundant (Redundant) . . . o --no-show-locs second shared library . o --no-show-relative-offset-changes ( ) . . o --no-unreferenced-symbols . . o --non-reachable-types|-t . . --headers-dir{1,2} / header-file{1,2} . ( --suppressions) ( ) . . o --redundant . . o --show-bits . . o --show-bytes . . o --show-dec (Decimal). . o --show-hex (Hexadecimal). o --stat ABI first-shared-library second-shared-library . o --stats . o --suppressions | --suppr <#suppr-spec-label> path-to-suppressions. . . . o --symtabs first-shared-library second-shared-library . o --verbose (Verbose) . o --version | -v . (RETURN VALUES) abidiff ABI 0 . . 1 ABIDIFF_ERROR . 2 ABIDIFF_USAGE_ERROR . . ABIDIFF_ERROR . 4 ABIDIFF_ABI_CHANGE ABI . 8 ABIDIFF_ABI_INCOMPATIBLE_CHANGE ABI . ABIDIFF_ABI_CHANGE . ABIDIFF_ABI_CHANGE ABIDIFF_INCOMPATIBLE_CHANGE . ABI . ABI ABIDIFF_ABI_INCOMPATIBLE_CHANGE . ABI : o (Export) . o (vtable) C++. ABI ABIDIFF_ABI_INCOMPATIBLE_CHANGE . . . (USAGE EXAMPLES) 1. : $ cat -n test-v0.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v0.so test-v0.cc 3 4 struct S0 5 { 6 int m0; 7 }; 8 9 void 10 foo(S0* /*parameter_name*/) 11 { 12 // do something with parameter_name. 13 } $ $ cat -n test-v1.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v1.so test-v1.cc 3 4 struct type_base 5 { 6 int inserted; 7 }; 8 9 struct S0 : public type_base 10 { 11 int m0; 12 }; 13 14 void 15 foo(S0* /*parameter_name*/) 16 { 17 // do something with parameter_name. 18 } $ $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc $ $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?" Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C]'function void foo(S0*)' has some indirect sub-type changes: parameter 0 of type 'S0*' has sub-type changes: in pointed to type 'struct S0': size changed from 32 to 64 bits 1 base class insertion: struct type_base 1 data member change: 'int S0::m0' offset changed from 0 to 32 exit code: 4 $ 4 ABIDIFF_ABI_CHANGE 4 1 . ABI (Harmful) <# harmfulchangeconcept-label> . 2. ABI : $ cat -n test-v0.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v0.so test-v0.cc 3 4 struct S0 5 { 6 int m0; 7 }; 8 9 S0 10 foo() 11 { 12 S0 s = {}; 13 return s; 14 } $ $ cat -n test-v1.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v1.so test-v1.cc 3 4 struct type_base 5 { 6 int inserted; 7 }; 8 9 struct S0 : public type_base 10 { 11 int m0; 12 }; 13 14 S0 15 foo() 16 { 17 S0 s = {}; 18 return s; 19 } $ $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc $ $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?" Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with incompatible sub-type changes: [C] 'function S0 foo(void)' at test-v0.cc:10:1 has some sub-type changes: return type changed: type size changed from 32 to 64 (in bits) 1 base class insertion: struct type_base at test-v1.cc:4:1 1 data member change: 'int m0' offset changed from 0 to 32 (in bits) (by +32 bits) exit code: 12 $ 12 ABIDIFF_ABI_CHANGE 4 ABIDIFF_ABI_INCOMPATIBLE_CHANGE 8 1 . ABI <#incompatiblechangeconcept-label> . ABI ( ABI break) . 3. : $ cat -n test-v0.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v0.so test-v0.cc 3 4 struct S0 5 { 6 int m0; 7 }; 8 9 void 10 foo(S0& /*parameter_name*/) 11 { 12 // do something with parameter_name. 13 } $ $ cat -n test-v1.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v1.so test-v1.cc 3 4 struct S0 5 { 6 char inserted_member; 7 int m0; 8 }; 9 10 void 11 foo(S0& /*parameter_name*/) 12 { 13 // do something with parameter_name. 14 } $ $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc $ $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?" Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C]'function void foo(S0&)' has some indirect sub-type changes: parameter 0 of type 'S0&' has sub-type changes: in referenced type 'struct S0': size changed from 32 to 64 bits 1 data member insertion: 'char S0::inserted_member', at offset 0 (in bits) 1 data member change: 'int S0::m0' offset changed from 0 to 32 exit code: 4 $ 4. : $ cat -n test-v0.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v0.so test-v0.cc 3 4 struct S0 5 { 6 int m0; 7 }; 8 9 void 10 foo(S0& /*parameter_name*/) 11 { 12 // do something with parameter_name. 13 } $ $ cat -n test-v1.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-v1.so test-v1.cc 3 4 struct S0 5 { 6 char inserted_member; 7 int m0; 8 }; 9 10 void 11 bar(S0& /*parameter_name*/) 12 { 13 // do something with parameter_name. 14 } $ $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc $ $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?" Functions changes summary: 1 Removed, 0 Changed, 1 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 Removed function: 'function void foo(S0&)' {_Z3fooR2S0} 1 Added function: 'function void bar(S0&)' {_Z3barR2S0} exit code: 12 $ 5. : $ abidiff --add-binaries1=file2-v1 \ --add-binaries2=file2-v2,file2-v1 \ --added-binaries-dir1 dir1 \ --added-binaries-dir2 dir2 \ file1-v1 file1-v2 file2-v1 file2-v2 dir1 dir2 . 6. : $ abidiff --follow-dependencies \ --added-binaries-dir1 /some/where \ --added-binaries-dir2 /some/where/else \ foo bar foo bar . (AUTHORS) Dodji Seketeli (COPYRIGHT) 2014-2025, Red Hat, Inc. 1 2026 ABIDIFF(1)