Difference between revisions of "Binary Compatibility"

From OpenSSLWiki
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
    
 
    
 
   ./config -d --prefix=$PREFIX/openssl-1.0.2d/ shared
 
   ./config -d --prefix=$PREFIX/openssl-1.0.2d/ shared
   sed -i -e 's/ \-O0 / /' Makefile
+
   sed -i -e 's/ \-O0 / -g -Og /' Makefile
   sed -i -e 's/ \-g / -g -Og /' Makefile
+
   sed -i -e 's/ \-g/ -g -Og/' Makefile
 
   make
 
   make
 
   make install_sw
 
   make install_sw
Line 14: Line 14:
 
Install [https://github.com/lvc/abi-dumper abi-dumper] tool (1.0 Beta or newer) and run it on shared objects to create ABI dumps:
 
Install [https://github.com/lvc/abi-dumper abi-dumper] tool (1.0 Beta or newer) and run it on shared objects to create ABI dumps:
  
   abi-dumper -o libssl-1.0.2.d.abi -public-headers $PREFIX/openssl-1.0.2d/include/ -vnum 1.0.2d $PREFIX/openssl-1.0.2d/lib/libssl.so.1.0.0
+
   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.
 
The -public-headers option is needed to filter out private part of the ABI.
Line 21: Line 21:
 
Install [https://github.com/lvc/abi-compliance-checker abi-compliance-checker] tool (1.99.13 or newer) and run it on two ABI dumps to create report:
 
Install [https://github.com/lvc/abi-compliance-checker 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.2.c.abi -new libssl-1.0.2.d.abi -headers-list ./headers.list -report-path ./report.html
+
   abi-compliance-checker -l libssl -bin -old libssl-1.0.2c.abi -new libssl-1.0.2d.abi -report-path ./report.html

Latest revision as of 13:35, 13 September 2018

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