aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Ponomarenko <andrewponomarenko@yandex.ru>2016-01-28 15:06:08 +0300
committerAndrey Ponomarenko <andrewponomarenko@yandex.ru>2016-01-28 15:06:08 +0300
commite3419b4a6666e1a56a0b3d34449f8bd0f73b11a9 (patch)
treef00aa4bb6bf2d740ae7c395e2d2de64dc525993b
parentaf3625cb7a6110750de6f5873fa99f915c367894 (diff)
downloadabi-compliance-checker-e3419b4a6666e1a56a0b3d34449f8bd0f73b11a9.tar.gz
Do not check private part of the ABI. Fixed counting of checked data types.
-rw-r--r--INSTALL21
-rw-r--r--README16
-rw-r--r--abi-compliance-checker.pl62
-rw-r--r--doc/Changelog.html21
-rw-r--r--doc/index.html68
5 files changed, 129 insertions, 59 deletions
diff --git a/INSTALL b/INSTALL
index a446c6c..6340ab6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,15 +2,15 @@
Copyright (C) 2009-2011 Institute for System Programming, RAS
Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2011-2012 ROSA Laboratory
-Copyright (C) 2012-2015 Andrey Ponomarenko's ABI Laboratory
+Copyright (C) 2012-2016 Andrey Ponomarenko's ABI Laboratory
All rights reserved.
RELEASE INFORMATION
Project: ABI Compliance Checker (ACC)
-Version: 1.99.15
-Date: 2015-12-11
+Version: 1.99.16
+Date: 2016-01-28
This file explains how to install and setup environment
@@ -23,7 +23,7 @@ Content:
2. Requirements for Mac OS X
3. Requirements for MS Windows
4. Configure and Install
- 5. Usage
+ 5. Usage (Original)
6. Usage with ABI Dumper
@@ -34,6 +34,7 @@ Content:
2. GNU Binutils (c++filt, readelf, objdump)
3. Perl 5 (5.8 or newer)
4. Ctags (5.8 or newer)
+ 5. ABI Dumper (0.99.14 or newer)
@@ -76,8 +77,8 @@ Content:
-5. USAGE
-========
+5. USAGE (ORIGINAL)
+===================
Create XML-descriptors for two versions
of a library (OLD.xml and NEW.xml):
@@ -102,15 +103,15 @@ Content:
abi-compliance-checker -lib NAME -old OLD.xml -new NEW.xml
- For advanced usage, see doc/Readme.html or --help option.
+ For advanced usage, see doc/index.html or -help option.
6. USAGE WITH ABI DUMPER
========================
- Library should be compiled with -g
- option to contain DWARF debug info.
+ Library should be compiled with -g -Og
+ options to contain DWARF debug info.
Create ABI dumps for both library versions
using the ABI Dumper tool (https://github.com/lvc/abi-dumper):
@@ -118,7 +119,7 @@ Content:
abi-dumper OLD.so -o ABI-0.dump -lver 0
abi-dumper NEW.so -o ABI-1.dump -lver 1
- Compare ABI dumps:
+ Compare ABI dumps to create report:
abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump
diff --git a/README b/README
index a859ae3..f0600a7 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
NAME:
- ABI Compliance Checker (ACC) - a tool for checking backward binary and source-level compatibility of a C/C++ software library.
+ ABI Compliance Checker (ABICC) - a tool for checking backward binary and source-level compatibility of a C/C++ software library.
The tool checks header files and shared objects of old and new versions and analyzes changes in API/ABI that may break binary and/or source compatibility: changes in calling stack, v-table changes, removed symbols, renamed fields, etc.
@@ -15,8 +15,9 @@ REQUIRES:
G++
GNU Binutils
Ctags
+ ABI Dumper (0.99.14 or newer)
-USAGE:
+USAGE (ORIGINAL):
abi-compliance-checker -lib NAME -old OLD.xml -new NEW.xml
OLD.xml and NEW.xml are XML-descriptors:
@@ -33,12 +34,6 @@ USAGE:
/path/to/libraries/
</libs>
-ADV. USAGE:
- For advanced usage, see doc/Readme.html or output of --help option.
-
-COMPATIBILITY:
- ABI Dumper >= 0.98 (https://github.com/lvc/abi-dumper)
-
USAGE WITH ABI DUMPER:
1. Library should be compiled with "-g -Og" GCC options
@@ -50,6 +45,9 @@ USAGE WITH ABI DUMPER:
abi-dumper OLD.so -o ABI-0.dump -lver 0
abi-dumper NEW.so -o ABI-1.dump -lver 1
- 3. Compare ABI dumps:
+ 3. Compare ABI dumps to create report:
abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump
+
+ADV. USAGE:
+ For advanced usage, see doc/index.html or output of -help option.
diff --git a/abi-compliance-checker.pl b/abi-compliance-checker.pl
index d10eb1d..a6ce328 100644
--- a/abi-compliance-checker.pl
+++ b/abi-compliance-checker.pl
@@ -1,12 +1,12 @@
#!/usr/bin/perl
###########################################################################
-# ABI Compliance Checker (ABICC) 1.99.15
+# ABI Compliance Checker (ABICC) 1.99.16
# A tool for checking backward compatibility of a C/C++ library API
#
# Copyright (C) 2009-2011 Institute for System Programming, RAS
# Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies)
# Copyright (C) 2011-2012 ROSA Laboratory
-# Copyright (C) 2012-2015 Andrey Ponomarenko's ABI Laboratory
+# Copyright (C) 2012-2016 Andrey Ponomarenko's ABI Laboratory
#
# Written by Andrey Ponomarenko
#
@@ -21,6 +21,7 @@
# - GNU Binutils (readelf, c++filt, objdump)
# - Perl 5 (5.8 or newer)
# - Ctags (5.8 or newer)
+# - ABI Dumper (0.99.14 or newer)
#
# Mac OS X
# - Xcode (g++, c++filt, otool, nm)
@@ -36,11 +37,6 @@
# - Add tool locations to the PATH environment variable
# - Run vsvars32.bat (C:\Microsoft Visual Studio 9.0\Common7\Tools\)
#
-# COMPATIBILITY
-# =============
-# ABI Dumper >= 0.99.12
-#
-#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License or the GNU Lesser
# General Public License as published by the Free Software Foundation.
@@ -64,7 +60,7 @@ use Storable qw(dclone);
use Data::Dumper;
use Config;
-my $TOOL_VERSION = "1.99.15";
+my $TOOL_VERSION = "1.99.16";
my $ABI_DUMP_VERSION = "3.2";
my $XML_REPORT_VERSION = "1.2";
my $XML_ABI_DUMP_VERSION = "1.2";
@@ -95,7 +91,7 @@ $SourceReportPath, $UseXML, $SortDump, $DumpFormat,
$ExtraInfo, $ExtraDump, $Force, $Tolerance, $Tolerant, $SkipSymbolsListPath,
$CheckInfo, $Quick, $AffectLimit, $AllAffected, $CppIncompat,
$SkipInternalSymbols, $SkipInternalTypes, $TargetArch, $GccOptions,
-$TypesListPath, $SkipTypesListPath);
+$TypesListPath, $SkipTypesListPath, $CheckPrivateABI);
my $CmdName = get_filename($0);
my %OS_LibExt = (
@@ -256,6 +252,7 @@ GetOptions("h|help!" => \$Help,
"all-affected!" => \$AllAffected,
"skip-internal-symbols|skip-internal=s" => \$SkipInternalSymbols,
"skip-internal-types=s" => \$SkipInternalTypes,
+ "check-private-abi!" => \$CheckPrivateABI
) or ERR_MESSAGE();
sub ERR_MESSAGE()
@@ -757,6 +754,13 @@ OTHER OPTIONS:
-skip-internal-types PATTERN
Do not check types matched by the pattern.
+
+ -check-private-abi
+ Check data types from the private part of the ABI when
+ comparing ABI dumps created by the ABI Dumper tool with
+ use of the -public-headers option.
+
+ Requires ABI Dumper >= 0.99.14
REPORT:
Compatibility report will be generated to:
@@ -10507,6 +10511,11 @@ sub mergeVTables($)
my $Level = $_[0];
foreach my $ClassName (keys(%{$VirtualTable{1}}))
{
+ my $ClassId = $TName_Tid{1}{$ClassName};
+ if(isPrivateABI($ClassId, 1)) {
+ next;
+ }
+
if($VTableChanged_M{$ClassName})
{ # already registered
next;
@@ -10531,6 +10540,11 @@ sub mergeBases($)
{ # detect added and removed virtual functions
my $ClassId = $TName_Tid{1}{$ClassName};
next if(not $ClassId);
+
+ if(isPrivateABI($ClassId, 1)) {
+ next;
+ }
+
if(defined $VirtualTable{2}{$ClassName})
{
foreach my $Symbol (keys(%{$VirtualTable{2}{$ClassName}}))
@@ -10628,6 +10642,11 @@ sub mergeBases($)
{
my $ClassId_Old = $TName_Tid{1}{$ClassName};
next if(not $ClassId_Old);
+
+ if(isPrivateABI($ClassId_Old, 1)) {
+ next;
+ }
+
if(not isCreatable($ClassId_Old, 1))
{ # skip classes without public constructors (including auto-generated)
# example: class has only a private exported or private inline constructor
@@ -11401,6 +11420,21 @@ sub removeVPtr($)
}
}
+sub isPrivateABI($$)
+{
+ my ($TypeId, $LibVersion) = @_;
+
+ if($CheckPrivateABI) {
+ return 0;
+ }
+
+ if(defined $TypeInfo{$LibVersion}{$TypeId}{"PrivateABI"}) {
+ return 1;
+ }
+
+ return 0;
+}
+
sub mergeTypes($$$)
{
my ($Type1_Id, $Type2_Id, $Level) = @_;
@@ -11417,12 +11451,9 @@ sub mergeTypes($$$)
return {};
}
- $CheckedTypes{$Level}{$Type1{"Name"}} = 1;
my %Type1_Pure = get_PureType($Type1_Id, $TypeInfo{1});
my %Type2_Pure = get_PureType($Type2_Id, $TypeInfo{2});
- $CheckedTypes{$Level}{$Type1_Pure{"Name"}} = 1;
-
if(defined $UsedDump{1}{"DWARF"})
{
if($Type1_Pure{"Name"} eq "__unknown__"
@@ -11432,6 +11463,13 @@ sub mergeTypes($$$)
}
}
+ if(isPrivateABI($Type1_Id, 1)) {
+ return {};
+ }
+
+ $CheckedTypes{$Level}{$Type1{"Name"}} = 1;
+ $CheckedTypes{$Level}{$Type1_Pure{"Name"}} = 1;
+
my %SubProblems = ();
if($Type1_Pure{"Name"} eq $Type2_Pure{"Name"})
diff --git a/doc/Changelog.html b/doc/Changelog.html
index 6ff72a6..507c04d 100644
--- a/doc/Changelog.html
+++ b/doc/Changelog.html
@@ -44,6 +44,27 @@
<p/>
<br/>
+<b>Version 1.99.16 (January 28, 2016)</b><br/>
+<b>Improvements</b>
+<ul>
+ <li>
+ Do not check private part of the ABI when comparing ABI dumps created by the ABI Dumper tool with use of the -public-headers option
+ </li>
+</ul>
+<b>New Options</b>
+<ul>
+ <li>
+ -check-private-abi: enable check of the private ABI
+ </li>
+</ul>
+<b>Bug Fixes</b>
+<ul>
+ <li>
+ Fixed counting of checked data types
+ </li>
+</ul>
+<br/>
+
<b>Version 1.99.15 (December 11, 2015)</b><br/>
<b>Bug Fixes</b>
<ul>
diff --git a/doc/index.html b/doc/index.html
index cbe6f55..39def3e 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -71,18 +71,18 @@
<li><a href="#Supported_Platforms">Supported Platforms</a></li>
<li><a href="#Dependencies">Dependencies</a></li>
<li><a href="#Installation">Installation</a></li>
-<li><a href="#Usage">Usage</a></li>
+<li><a href="#Usage">Usage (Original)</a></li>
+<li><a href="#ABI_Dumper">Usage with ABI Dumper</a></li>
+<li><a href="#Tutorial">Tutorial</a></li>
<li><a href="#Examples">Examples</a></li>
<li><a href="#BinaryProblems">Detectable Binary-Compatibility Problems</a></li>
<li><a href="#SourceProblems">Detectable Source-Compatibility Problems</a></li>
<li><a href="#Dump">Create ABI Dumps</a></li>
-<li><a href="#ABI_Dumper">Usage with ABI Dumper</a></li>
<li><a href="#Report">Report Format</a></li>
<li><a href="#Verdict">Verdict on Compatibility</a></li>
<li><a href="#Error">Error Codes</a></li>
<li><a href="#FAQ">FAQ</a></li>
<li><a href="#Similar">Similar Tools</a></li>
-<li><a href="#Tutorial">Tutorial</a></li>
<li><a href="#Bugs">Bugs</a></li>
<li><a href="#Maintainers">Maintainers</a></li>
<li><a href="#ChangeLog">Changes</a></li>
@@ -94,7 +94,7 @@
<h2>Downloads</h2>
<p>All releases can be downloaded from <a href="https://github.com/lvc/abi-compliance-checker/">this page</a>.</p>
-<p>Latest release: <a href="https://github.com/lvc/abi-compliance-checker/archive/1.99.15.tar.gz">abi-compliance-checker-1.99.15.tar.gz</a></p>
+<p>Latest release: <a href="https://github.com/lvc/abi-compliance-checker/archive/1.99.16.tar.gz">abi-compliance-checker-1.99.16.tar.gz</a></p>
<p>Read-only access to the latest development version:</p>
@@ -140,9 +140,10 @@ On MS Windows the tool also requires MinGW, MS Visual C++ (dumpbin, undname, cl)
<p>This command will install the <code>abi-compliance-checker</code> program into the <code>PREFIX/bin</code> system directory and private modules into the <code>PREFIX/share</code>.</p>
<a name="Usage"></a>
-<h2>Usage</h2>
-
-For using the tool, you should provide the <a href='Xml-Descriptor.html'>XML descriptors</a> for two library versions: <code>v1.xml</code> and <code>v2.xml</code> files. Library descriptor is a simple XML-file that specifies version number, paths to header files and shared libraries and other optional information. An example of the descriptor is the following (<code>0.3.4.xml</code>):
+<h2>Usage (Original)</h2>
+The original usage is based on the analysis of header files and shared objects (without debug-info).
+<p/>
+You should provide <a href='Xml-Descriptor.html'>XML descriptors</a> for two library versions (<code>v1.xml</code> and <code>v2.xml</code> files) in order to run the analysis. Library descriptor is a simple XML-file that specifies version number, paths to header files and shared libraries and other optional information. An example of the descriptor is the following (<code>0.3.4.xml</code>):
<p/>
<div class='listing'>
<pre>
@@ -170,6 +171,33 @@ The compatibility report will be generated to:
<code class='code'>compat_reports/NAME/V1_to_V2/compat_report.html</code>
<p/>
+<a name="ABI_Dumper"></a>
+<h2>Usage with ABI Dumper</h2>
+This new way is based on the analysis of the debug-info from binary objects. It's more reliable, faster and simple way.
+<p/>
+The analyzed library should be compiled with "-g -Og" GCC options to contain DWARF debug info.
+<p/>
+Create ABI dumps for both library versions first using the <a href='https://github.com/lvc/abi-dumper'>ABI Dumper</a> tool:
+<p/>
+<code class='code'>abi-dumper OLD.so -o ABI-0.dump -lver 0</code>
+<p/>
+<code class='code'>abi-dumper NEW.so -o ABI-1.dump -lver 1</code>
+<p/>
+And then compare ABI dumps to create report:
+<p/>
+<code class='code'>abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump</code>
+<p/>
+The compatibility report will be generated to:
+<p/>
+<code class='code'>compat_reports/NAME/V0_to_V1/compat_report.html</code>
+<p/>
+You can filter out private symbols from the ABI dumps by specifying of additional <code>-public-headers</code> option of the ABI Dumper tool.
+
+<a name="Tutorial"></a>
+<h2>Tutorial</h2>
+An excellent tutorial <a href='http://blog.famillecollet.com/post/2010/06/20/ABI-%3A-stability-check'>"ABI: stability check"</a> is available at Les RPM de Remi Blog. See also <a href='http://sourceware.org/glibc/wiki/Testing/ABI_checker'>ABI compliance checker Notes</a> at glibc wiki.
+<p/>
+
<a name="Examples"></a>
<h2>Examples</h2>
<table class='summary'>
@@ -177,19 +205,21 @@ The compatibility report will be generated to:
<tr>
<td>NetCDF</td>
<td>4.0.1 to 4.1.1</td>
-<td><a href='http://upstream-tracker.org/compat_reports/netcdf/4.0.1_to_4.1.1/compat_report.html'>report</a></td>
+<td><a href='http://upstream.rosalinux.ru/compat_reports/netcdf/4.0.1_to_4.1.1/compat_report.html'>report</a></td>
</tr>
<tr>
<td>MySQL++</td>
<td>3.0.9 to 3.1.0</td>
-<td><a href='http://upstream-tracker.org/compat_reports/mysql++/3.0.9_to_3.1.0/abi_compat_report.html'>report</a></td>
+<td><a href='http://upstream.rosalinux.ru/compat_reports/mysql++/3.0.9_to_3.1.0/abi_compat_report.html'>report</a></td>
</tr>
<tr>
<td>libssh</td>
<td>0.3.4 to 0.4.0</td>
-<td><a href='http://upstream-tracker.org/compat_reports/libssh/0.3.4_to_0.4.0/abi_compat_report.html'>report</a></td>
+<td><a href='http://upstream.rosalinux.ru/compat_reports/libssh/0.3.4_to_0.4.0/abi_compat_report.html'>report</a></td>
</tr>
</table>
+<p/>
+See more report examples at <a href='http://abi-laboratory.pro/tracker/'>http://abi-laboratory.pro/tracker/</a>.
<a name="BinaryProblems"></a>
<h2>Detectable Binary Compatibility Problems</h2>
@@ -458,19 +488,6 @@ To compare ABI dumps pass them as the descriptors:
<p/>
<code class='code'>abi-compliance-checker -lib NAME -old V1.abi.tar.gz -new V2.abi.tar.gz</code>
-<a name="ABI_Dumper"></a>
-<h2>Usage with ABI Dumper</h2>
-The analyzed library should be compiled with "-g -Og" GCC options to contain DWARF debug info.
-<p/>
-Create ABI dumps for both library versions using the <a href='https://github.com/lvc/abi-dumper'>ABI Dumper</a> tool:
-<p/>
-<code class='code'>abi-dumper OLD.so -o ABI-0.dump -lver 0</code>
-<p/>
-<code class='code'>abi-dumper NEW.so -o ABI-1.dump -lver 1</code>
-<p/>
-Compare ABI dumps:
-<code class='code'>abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump</code>
-
<a name="Report"></a>
<h2>Report Format</h2>
The tool supports two formats of a compatibility report: HTML (default) and XML. To generate XML report you should specify <code>-xml</code> additional option.
@@ -570,11 +587,6 @@ If the tool detects problems with high or medium level of severity or at least o
</li>
</ul>
-<a name="Tutorial"></a>
-<h2>Tutorial</h2>
-An excellent tutorial <a href='http://blog.famillecollet.com/post/2010/06/20/ABI-%3A-stability-check'>"ABI: stability check"</a> is available at Les RPM de Remi Blog. See also <a href='http://sourceware.org/glibc/wiki/Testing/ABI_checker'>ABI compliance checker Notes</a> at glibc wiki.
-<p/>
-
<a name="Bugs"></a>
<h2>Bugs</h2>
Please post bug reports, feature requests and questions to the <a href="https://github.com/lvc/abi-compliance-checker/issues">issue tracker</a>.