[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

abi-compliance-checker and abi-dumper to track API/ABI


There is a new simple way to track changes in API/ABI of system libraries using a new ABI dumper [1] tool. Just compile two library versions with -g additional option (to contain DWARF debug info) or take them from the appropriate debug packages and create ABI dumps of both:

  abi-dumper OLD.so -o ABI-0.dump -lver 0
  abi-dumper NEW.so -o ABI-1.dump -lver 1

Then compare these ABI dumps by the ACC [2] tool:

  abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump

So it is no need to create any input XML descriptors and compile header files of a library anymore.

However, this approach has some drawbacks. Perhaps the main drawback is the inability to perform some compatibility checks. For example, there is no possibility to check for changes in the values of the constants (defines as well as const global data), since their values are inlined at compile time, and not presented in the debug information of the binary ELF-object. In general, there can be checked about 98% of all compatibility rules.

Another disadvantage is the long time required to analyse large objects bigger than 50 mb. But one can use the dwz utility to compress input debug-info.


[1] https://github.com/lvc/abi-dumper
[2] https://github.com/lvc/abi-compliance-checker

Andrey Ponomarenko, ROSA Lab.

Reply to: