Binary Compatibility

From OpenSSLWiki
Jump to navigationJump to search

This approach allows to manually detect most of the possible binary compatibility issues between any particular releases of the OpenSSL. Alternatively one can set up a local instance of the ABI tracker for OpenSSL to automate analysis for sequential releases of the library.

Build two versions of the library with debug info[edit]

The library should be built with -g and -Og options of the GCC compiler and installed to a local directory (PREFIX=/home/USER):

 ./config -d --prefix=$PREFIX/openssl-1.0.2d/ shared
 sed -i -e 's/ \-O0 / -g -Og /' Makefile
 sed -i -e 's/ \-g/ -g -Og/' Makefile
 make
 make install_sw

Make ABI dumps of the library versions[edit]

Install abi-dumper tool (1.0 Beta or newer) and run it on shared objects to create ABI dumps:

 abi-dumper -o libssl-1.0.2d.abi -public-headers $PREFIX/openssl-1.0.2d/include/ -vnum 1.0.2d $PREFIX/openssl-1.0.2d/lib/libssl.so.1.0.0

The -public-headers option is needed to filter out private part of the ABI.

Compare ABI dumps to produce report[edit]

Install abi-compliance-checker tool (1.99.13 or newer) and run it on two ABI dumps to create report:

 abi-compliance-checker -l libssl -bin -old libssl-1.0.2c.abi -new libssl-1.0.2d.abi -report-path ./report.html