ABICOMPAT(1) Libabigail ABICOMPAT(1) (NAME) abicompat - ABI abicompat ABI . ABI abicompat . (SYNOPSIS) abicompat [options] [ ] (OPTIONS) o --help . o --version | -v . o --list-undefined-symbols | -u (undefined symbols) . o --show-base-names | -b (base name) . . o --app-debug-info-dir | --appd . . o --lib-debug-info-dir1 | --libd1 . . o --lib-debug-info-dir2 | --libd2 . . o --suppressions | --suppr (suppression specification) <#suppr-spec-label> path-to-suppressions. . o --no-show-locs . o --btf ABI BTF . o --ctf ABI CTF . o --fail-no-debug-info . ( ELF) . o --ignore-soname SONAME . o --weak-mode (weak mode) abicompat . . abicompat : abicompat --weak-mode --weak-mode abicompat : abicompat (export) ( ) . abicompat . abicompat ABI . abicompat () . (weak) . (EXIT STATUS) abicompat 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 . . (EXAMPLES) o ABI : $ cat -n test0.h 1 struct foo 2 { 3 int m0; 4 5 foo() 6 : m0() 7 {} 8 }; 9 10 foo* 11 first_func(); 12 13 void 14 second_func(foo&); 15 16 void 17 third_func(); $ $ cat -n test-app.cc 1 // Compile with: 2 // g++ -g -Wall -o test-app -L. -ltest-0 test-app.cc 3 4 #include "test0.h" 5 6 int 7 main() 8 { 9 foo* f = first_func(); 10 second_func(*f); 11 return 0; 12 } $ $ cat -n test0.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-0.so test0.cc 3 4 #include "test0.h" 5 6 foo* 7 first_func() 8 { 9 foo* f = new foo(); 10 return f; 11 } 12 13 void 14 second_func(foo&) 15 { 16 } 17 18 void 19 third_func() 20 { 21 } $ $ cat -n test1.h 1 struct foo 2 { 3 int m0; 4 char m1; /* <-- a new member got added here! */ 5 6 foo() 7 : m0(), 8 m1() 9 {} 10 }; 11 12 foo* 13 first_func(); 14 15 void 16 second_func(foo&); 17 18 void 19 third_func(); $ $ cat -n test1.cc 1 // Compile this with: 2 // g++ -g -Wall -shared -o libtest-1.so test1.cc 3 4 #include "test1.h" 5 6 foo* 7 first_func() 8 { 9 foo* f = new foo(); 10 return f; 11 } 12 13 void 14 second_func(foo&) 15 { 16 } 17 18 /* Let's comment out the definition of third_func() 19 void 20 third_func() 21 { 22 } 23 */ $ o : libtest-0.so libtest-1.so: $ g++ -g -Wall -shared -o libtest-0.so test0.cc $ g++ -g -Wall -shared -o libtest-1.so test1.cc o test-app: $ g++ -g -Wall -o test-app -L. -ltest-0.so test-app.cc o abicompat libtest-1.so ABI libtest-0.so ABI : $ abicompat test-app libtest-0.so libtest-1.so ELF file 'test-app' might not be ABI compatible with 'libtest-1.so' due to differences with 'libtest-0.so' below: Functions changes summary: 0 Removed, 2 Changed, 0 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 2 functions with some indirect sub-type change: [C]'function foo* first_func()' has some indirect sub-type changes: return type changed: in pointed to type 'struct foo': size changed from 32 to 64 bits 1 data member insertion: 'char foo::m1', at offset 32 (in bits) [C]'function void second_func(foo&)' has some indirect sub-type changes: parameter 0 of type 'foo&' has sub-type changes: referenced type 'struct foo' changed, as reported earlier $ o abicompat : $ abicompat --weak-mode test-app libtest-1.so functions defined in library 'libtest-1.so' have sub-types that are different from what application 'test-app' expects: function foo* first_func(): return type changed: in pointed to type 'struct foo': size changed from 32 to 64 bits 1 data member insertion: 'char foo::m1', at offset 32 (in bits) $ (AUTHORS) Dodji Seketeli (COPYRIGHT) 2014-2025, Red Hat, Inc. May 1, 2026 ABICOMPAT(1)