abidiff(1): Skillnad mellan sidversioner

Från Wiki.linux.se
Hoppa till navigering Hoppa till sök
(Skapade sidan med 'Nedan är en svensk översättning i **MediaWiki-format** av den text du klistrade in. (Du gav ett utdrag som slutar vid `--version`, så översättningen nedan täcker exakt det som syns i ditt utdrag.) --- == NAMN == '''abidiff''' – jämför ABI:er för ELF-filer '''abidiff''' jämför *Application Binary Interface* (ABI) för två delade bibliotek i ELF-format (*Executable and Linkable Format*). Verktyget skriver ut en meningsfull rapport som beskriver skilln...')
 
Ingen redigeringssammanfattning
(4 mellanliggande sidversioner av samma användare visas inte)
Rad 1: Rad 1:
Nedan är en svensk översättning i **MediaWiki-format** av den text du klistrade in. (Du gav ett utdrag som slutar vid `--version`, så översättningen nedan täcker exakt det som syns i ditt utdrag.)
<h1>abidiff(1) &mdash; Linux manual page</h1>


---


== NAMN ==
<table class="sec-table">
'''abidiff''' – jämför ABI:er för ELF-filer
<tr>
    <td>
        <p class="section-dir">
<a href="#NAME">NAME</a> | <a href="#INVOCATION">INVOCATION</a> | <a href="#ENVIRONMENT">ENVIRONMENT</a> | <a href="#OPTIONS">OPTIONS</a> | <a href="#RETURN_VALUES">RETURN&nbsp;VALUES</a> | <a href="#USAGE_EXAMPLES">USAGE&nbsp;EXAMPLES</a> | <a href="#AUTHOR">AUTHOR</a> | <a href="#COPYRIGHT">COPYRIGHT</a> | <a href="#COLOPHON">COLOPHON</a>
        </p>
    </td>
</tr>
<tr>
    <td class="search-box">
        <div class="man-search-box">


'''abidiff''' jämför *Application Binary Interface* (ABI) för två delade bibliotek i [[ELF]]-format (*Executable and Linkable Format*). Verktyget skriver ut en meningsfull rapport som beskriver skillnaderna mellan de två ABI:erna.
            <form method="get" action="https://www.google.com/search">
                <fieldset class="man-search">
                    <input type="text" name="q" size="10" maxlength="255" value="" />
                    <input type="hidden" name="sitesearch" value="man7.org/linux/man-pages" />
                    <input type="submit" name="sa" value="Search online pages" />
                </fieldset>
            </form>


Det här verktyget kan också jämföra de textuella representationerna av ABI:t för två ELF-binärer (som genereras av '''abidw'''), eller jämföra en ELF-binär mot en textuell representation av en annan ELF-binär.
        </div>
    </td>
    <td> </td>
</tr>
</table>


För en omfattande rapport över ABI-ändringar mellan två inmatade delade bibliotek – inklusive ändringar i funktioners och variablers undertyper – använder '''abidiff''' som standard felsökningsinformation i [[DWARF]]-format, om sådan finns. I annat fall jämför den gränssnitt med felsökningsinformation i [[CTF]]- eller [[BTF]]-format, om sådan finns. Om ingen felsökningsinformation i dessa format hittas, beaktas endast [[ELF]]-symboler och rapporten handlar då om att symboler har lagts till eller tagits bort.
<!--%%%TEXT_START%%%-->
<pre>
<span class="headline"><i>ABIDIFF</i>(1)                      Libabigail                    <i>ABIDIFF</i>(1)</span>
</pre>
<h2><a id="NAME" href="#NAME"></a>NAME  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
      abidiff - compare ABIs of ELF files
 
      abidiff compares the Application Binary Interfaces (ABI) of two
      shared libraries in �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ format.  It emits a meaningful report
      describing the differences between the two ABIs.
 
      This tool can also compare the textual representations of the ABI
      of two ELF binaries (as emitted by <b>abidw</b>) or an ELF binary against
      a textual representation of another ELF binary.
 
      For a comprehensive ABI change report between two input shared
      libraries that includes changes about function and variable
      sub-types, <b>abidiff </b>uses by default, debug information in �]8;;http://www.dwarfstd.org�\<i>DWARF</i>�]8;;�\
      format, if present, otherwise it compares interfaces using debug
      information in �]8;;https://raw.githubusercontent.com/wiki/oracle/binutils-gdb/files/ctf-spec.pdf�\<i>CTF</i>�]8;;�\ or �]8;;https://docs.kernel.org/bpf/btf.html�\<i>BTF</i>�]8;;�\ formats, if present. Finally, if no
      debug info in these formats is found, it only considers �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\
      symbols and report about their addition or removal.
 
      This tool uses the libabigail library to analyze the binary as
      well as its associated debug information.  Here is its general
      mode of operation.
 
      When instructed to do so, a binary and its associated debug
      information is read and analyzed.  To that effect, libabigail
      analyzes by default the descriptions of the types reachable by the
      interfaces (functions and variables) that are visible outside of
      their translation unit.  Once that analysis is done, an
      Application Binary Interface Corpus is constructed by only
      considering the subset of types reachable from interfaces
      associated to �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ symbols that are defined and exported by the
      binary.  It's that final ABI corpus which libabigail considers as
      representing the ABI of the analyzed binary.
 
      Libabigail then has capabilities to generate textual
      representations of ABI Corpora, compare them, analyze their
      changes and report about them.
</pre>
<h2><a id="INVOCATION" href="#INVOCATION"></a>INVOCATION  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
          abidiff [options] &lt;first-shared-library&gt; &lt;second-shared-library&gt;
</pre>
<h2><a id="ENVIRONMENT" href="#ENVIRONMENT"></a>ENVIRONMENT  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
      abidiff loads two default <i>suppression specifications files</i>, merges
      their content and use it to filter out ABI change reports that
      might be considered as false positives to users.
 
      • Default system-wide suppression specification file
 
        It's located by the optional environment variable
        LIBABIGAIL_DEFAULT_SYSTEM_SUPPRESSION_FILE.  If that environment
        variable is not set, then abidiff tries to load the suppression
        file $libdir/libabigail/libabigail-default.abignore.  If that
        file is not present, then no default system-wide suppression
        specification file is loaded.
 
      • Default user suppression specification file.
 
        It's located by the optional environment
        LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE.  If that environment
        variable is not set, then abidiff tries to load the suppression
        file $HOME/.abignore.  If that file is not present, then no
        default user suppression specification is loaded.
</pre>
<h2><a id="OPTIONS" href="#OPTIONS"></a>OPTIONS  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
          • <b>--add-binaries1 </b>&lt;<i>bin1,bin2,bin3,..</i>&gt;
 
            For each of the comma-separated binaries given in argument to
            this option, if the binary is found in the directory
            specified by the <b>--added-binaries-dir1 </b>option, then <b>abidiff</b>
            loads the ABI corpus of the binary and adds it to a set of
            corpora (called an ABI Corpus Group) that includes the first
            argument of <b>abidiff</b>.
 
            That ABI corpus group is then compared against the second
            corpus group given in argument to <b>abidiff</b>.
 
          • <b>--add-binaries2 </b>&lt;<i>bin1,bin2,bin3,..</i>&gt;
 
            For each of the comma-separated binaries given in argument to
            this option, if the binary is found in the directory
            specified by the <b>--added-binaries-dir2 </b>option, then <b>abidiff</b>
            loads the ABI corpus of the binary and adds it to a set of
            corpora(called an ABI Corpus Group) that includes the second
            argument of <b>abidiff</b>.
 
            That ABI corpus group is then compared against the first
            corpus group given in argument to <b>abidiff</b>.
 
          • <b>--added-binaries-dir1 | --abd1 </b>&lt;added-binaries-directory-1&gt;
 
            This option is to be used in conjunction with the
            <b>--add-binaries1</b>, <b>--follow-dependencies </b>and
            <b>--list-dependencies </b>options.  Binaries referred to by these
            options, if found in the directory
            <i>added-binaries-directory-1</i>, are loaded as ABI corpus and are
            added to the first ABI corpus group that is to be used in the
            comparison.
 
          • <b>--added-binaries-dir2 | --abd2 </b>&lt;added-binaries-directory-2&gt;
 
            This option is to be used in conjunction with the
            <b>--add-binaries2</b>, <b>--follow-dependencies </b>and
            <b>--list-dependencies </b>options.  Binaries referred to by these
            options, if found in the directory
            <i>added-binaries-directory-2</i>, are loaded as ABI corpus and are
            added to the second ABI corpus group to be used in the
            comparison.
 
          • <b>--added-fns</b>
 
            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the globally defined functions that were added to
            <i>second-shared-library</i>.
 
          • <b>--added-vars</b>
 
            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the global variables that were added (defined) to
            <i>second-shared-library</i>.
 
          • <b>--allow-non-exported-interfaces</b>
 
            When looking at the debug information accompanying a binary,
            this tool analyzes the descriptions of the types reachable by
            the interfaces (functions and variables) that are visible
            outside of their translation unit.  Once that analysis is
            done, an ABI corpus is constructed by only considering the
            subset of types reachable from interfaces associated to �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\
            symbols that are defined and exported by the binary.  It's
            those final ABI Corpora that are compared by this tool.
 
            The problem with that approach however is that analyzing all
            the interfaces that are visible from outside their
            translation unit can amount to a lot of data, especially when
            those binaries are applications, as opposed to shared
            libraries.  One example of such applications is the �]8;;https://kernel.org/�\<i>Linux</i>
            <i>Kernel</i>�]8;;�\.  Analyzing massive ABI Corpora like these can be
            extremely slow.
 
            In the presence of an "average sized" binary however one can
            afford having libabigail analyze all interfaces that are
            visible outside of their translation unit, using this option.
 
            Note that this option is turned on by default, unless we are
            in the presence of the �]8;;https://kernel.org/�\<i>Linux Kernel</i>�]8;;�\.
 
          • <b>--btf</b>
 
            When comparing binaries, extract ABI information from �]8;;https://docs.kernel.org/bpf/btf.html�\<i>BTF</i>�]8;;�\
            debug information, if present.
 
          • <b>--changed-fns</b>
 
            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the changes in sub-types of the global functions defined in
            <i>first-shared-library</i>.
 
          • <b>--changed-vars</b>
 
            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the changes in the sub-types of the global variables defined
            in <i>first-shared-library</i>
 
          • <b>--ctf</b>
 
            When comparing binaries, extract ABI information from �]8;;https://raw.githubusercontent.com/wiki/oracle/binutils-gdb/files/ctf-spec.pdf�\<i>CTF</i>�]8;;�\
            debug information, if present.
 
          • <b>--debug-info-dir1 | --d1 </b>&lt;<i>di-path1</i>&gt;
 
            For cases where the debug information for
            <i>first-shared-library</i> is split out into a separate file, tells
            <b>abidiff </b>where to find that separate debug information file.
 
            Note that <i>di-path</i> must point to the root directory under
            which the debug information is arranged in a tree-like
            manner.  Under Red Hat based systems, that directory is
            usually <b>&lt;root&gt;/usr/lib/debug</b>.
 
            This option can be provided several times with different root
            directories.  In that case, <b>abidiff </b>will potentially look
            into all those root directories to find the split debug info
            for <i>first-shared-library</i>.
 
            Note also that this option is not mandatory for split debug
            information installed by your system's package manager
            because then <b>abidiff </b>knows where to find it.
 
          • <b>--debug-info-dir2 | --d2 </b>&lt;<i>di-path2</i>&gt;
 
            Like <b>--debug-info-dir1</b>, this options tells <b>abidiff </b>where to
            find the split debug information for the
            <i>second-shared-library</i> file.
 
            This option can be provided several times with different root
            directories.  In that case, <b>abidiff </b>will potentially look
            into all those root directories to find the split debug info
            for <i>second-shared-library</i>.
 
          • <b>--debug-self-comparison</b>
 
            In this mode, error messages are emitted for types which fail
            type canonicalization, in some circumstances, when comparing
            a binary against itself.
 
            When comparing a binary against itself, canonical types of
            the second binary should be equal (as much as possible) to
            canonical types of the first binary.  When some discrepancies
            are detected in this mode, an abort signal is emitted and
            execution is halted.  This option should be used while
            executing the tool in a debugger, for troubleshooting
            purposes.
 
            This is an optional debugging and sanity check option.  To
            enable it the libabigail package needs to be configured with
            the --enable-debug-self-comparison configure option.
 
          • <b>--debug-tc</b>
 
            In this mode, the process of type canonicalization is put
            under heavy scrutiny.  Basically, during type
            canonicalization, each type comparison is performed twice:
            once in a structural mode (comparing every sub-type
            member-wise), and once using canonical comparison.  The two
            comparisons should yield the same result.  Otherwise, an
            abort signal is emitted and the process can be debugged to
            understand why the two kinds of comparison yield different
            results.
 
            This is an optional debugging and sanity check option.  To
            enable it the libabigail package needs to be configured with
            the --enable-debug-type-canonicalization configure option.
 
          • <b>--deleted-fns</b>
 
            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the globally defined functions that got deleted from
            <i>first-shared-library</i>.
 
          • <b>--deleted-vars</b>
 
            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the globally defined variables that were deleted from
            <i>first-shared-library</i>.
 
          • <b>--drop </b>&lt;<i>regex</i>&gt;
 
            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, drop the globally
            defined functions and variables which name match the regular
            expression <i>regex</i>.  As a result, no change involving these
            functions or variables will be emitted in the diff report.
 
          • <b>--drop-fn </b>&lt;<i>regex</i>&gt;
 
            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, drop the globally
            defined functions which name match the regular expression
            <i>regex</i>.  As a result, no change involving these functions will
            be emitted in the diff report.
 
          • <b>--drop-var </b>&lt;<i>regex</i>&gt;
 
            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, drop the globally
            defined variables matching a the regular expression <i>regex</i>.
 
          • <b>--drop-private-types</b>
 
            This option is to be used with the <b>--headers-dir1</b>,
            <b>header-file1</b>, <b>header-file2 </b>and <b>--headers-dir2 </b>options.  With
            this option, types that are <i>NOT</i> defined in the headers are
            entirely dropped from the internal representation build by
            Libabigail to represent the ABI.  They thus don't have to be
            filtered out from the final ABI change report because they
            are not even present in Libabigail's representation.
 
            Without this option however, those private types are kept in
            the internal representation and later filtered out from the
            report.
 
            This options thus potentially makes Libabigail consume less
            memory.  It's meant to be mainly used to optimize the memory
            consumption of the tool on binaries with a lot of publicly
            defined and exported types.
 
          • <b>--dump-diff-tree</b>
              After the diff report, emit a textual representation of the
              diff nodes tree used by the comparison engine to represent
              the changed functions and variables.  That representation
              is emitted to the error output for debugging purposes.
              Note that this diff tree is relevant only to functions and
              variables that have some sub-type changes.  Added or
              removed functions and variables do not have any diff nodes
              tree associated to them.
 
          • <b>--exported-interfaces-only</b>
 
            By default, when looking at the debug information
            accompanying a binary, this tool analyzes the descriptions of
            the types reachable by the interfaces (functions and
            variables) that are visible outside of their translation
            unit.  Once that analysis is done, an ABI corpus is
            constructed by only considering the subset of types reachable
            from interfaces associated to �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ symbols that are defined
            and exported by the binary.  It's those final ABI Corpora
            that are compared by this tool.
 
            The problem with that approach however is that analyzing all
            the interfaces that are visible from outside their
            translation unit can amount to a lot of data, especially when
            those binaries are applications, as opposed to shared
            libraries.  One example of such applications is the �]8;;https://kernel.org/�\<i>Linux</i>
            <i>Kernel</i>�]8;;�\.  Analyzing massive ABI corpora like these can be
            extremely slow.
 
            To mitigate that performance issue, this option allows
            libabigail to only analyze types that are reachable from
            interfaces associated with defined and exported �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ symbols.
 
            Note that this option is turned on by default when analyzing
            the �]8;;https://kernel.org/�\<i>Linux Kernel</i>�]8;;�\.  Otherwise, it's turned off by default.
 
          • <b>--fail-no-debug-info</b>
 
            If no debug info was found, then this option makes the
            program to fail.  Otherwise, without this option, the program
            will attempt to compare properties of the binaries that are
            not related to debug info, like pure ELF properties.
 
          • <b>--follow-dependencies | --fdeps</b>
 
            For each dependency of the first argument of <b>abidiff</b>, if it's
            found in the directory specified by the <b>--added-binaries-dir1</b>
            option, then construct an ABI corpus out of the dependency,
            add it to a set of corpora (called an ABI Corpus Group) that
            includes the first argument of <b>abidiff</b>.
 
            Similarly, for each dependency of the second argument of
            <b>abidiff</b>, if it's found in the directory specified by the
            <b>--added-binaries-dir2 </b>option, then construct an ABI corpus
            out of the dependency, add it to an ABI corpus group that
            includes the second argument of <b>abidiff</b>.
 
            These two ABI corpus groups are then compared against each
            other.
 
            Said otherwise, this makes <b>abidiff </b>compare the set of its
            first input and its dependencies against the set of its
            second input and its dependencies.
 
          • <b>--harmless</b>
 
            In the diff report, display only the <i>harmless</i> changes.  By
            default, the harmless changes are filtered out of the diff
            report keep the clutter to a minimum and have a greater
            chance to spot real ABI issues.
 
          • <b>--headers-dir1 | --hd1 </b>&lt;headers-directory-path-1&gt;
 
            Specifies where to find the public headers of the first
            shared library (or binary in general) that the tool has to
            consider.  The tool will thus filter out ABI changes on types
            that are not defined in public headers.
 
            Note that several public header directories can be specified
            for the first shared library.  In that case the
            <b>--headers-dir1 </b>option should be present several times on the
            command line, like in the following example:
 
                $ abidiff --headers-dir1 /some/path      \
                          --headers-dir1 /some/other/path \
                          binary-version-1 binary-version-2
 
          • <b>--headers-dir2 | --hd2 </b>&lt;headers-directory-path-2&gt;
 
            Specifies where to find the public headers of the second
            shared library that the tool has to consider.  The tool will
            thus filter out ABI changes on types that are not defined in
            public headers.
 
            Note that several public header directories can be specified
            for the second shared library.  In that case the
            <b>--headers-dir2 </b>option should be present several times like in
            the following example:
 
                $ abidiff --headers-dir2 /some/path      \
                          --headers-dir2 /some/other/path \
                          binary-version-1 binary-version-2
 
          • <b>--header-file1 | --hf1 </b>&lt;header-file-path-1&gt;


Det här verktyget använder biblioteket '''libabigail''' för att analysera binären samt tillhörande felsökningsinformation. Här är dess generella arbetssätt.
            Specifies where to find one public header of the first shared
            library that the tool has to consider. The tool will thus
            filter out ABI changes on types that are not defined in
            public headers.


När verktyget instrueras att göra det läses en binär och dess tillhörande felsökningsinformation in och analyseras. För detta analyserar libabigail som standard beskrivningarna av de typer som kan nås via gränssnitten (funktioner och variabler) som är synliga utanför sin översättningsenhet (*translation unit*). När analysen är klar konstrueras en *Application Binary Interface Corpus* genom att endast beakta den delmängd av typer som är nåbara från gränssnitt kopplade till [[ELF]]-symboler som är definierade och exporterade av binären. Det är denna slutliga ABI-korpus som libabigail betraktar som representerande ABI:t för den analyserade binären.
          • <b>--header-file2 | --hf2 </b>&lt;header-file-path-2&gt;


Libabigail har sedan möjlighet att generera textuella representationer av ABI-korpusar, jämföra dem, analysera deras ändringar och rapportera om dem.
            Specifies where to find one public header of the second
            shared library that the tool has to consider.  The tool will
            thus filter out ABI changes on types that are not defined in
            public headers.


== ANROP ==
          • <b>--help | -h</b>
'''abidiff''' [alternativ] <första-delade-bibliotek> <andra-delade-bibliotek>


== MILJÖ ==
            Display a short help about the command and exit.
'''abidiff''' läser in två standardfiler med *undertryckningsspecifikationer* (*suppression specifications*), slår samman deras innehåll och använder resultatet för att filtrera bort ABI-ändringsrapporter som användare kan uppfatta som falska positiva.


* Standardfil för systemomfattande undertryckningsspecifikation
          • <b>--ignore-soname</b>


  Den hittas via den valfria miljövariabeln '''LIBABIGAIL_DEFAULT_SYSTEM_SUPPRESSION_FILE'''. Om den miljövariabeln inte är satt försöker abidiff läsa undertryckningsfilen '''$libdir/libabigail/libabigail-default.abignore'''. Om den filen inte finns laddas ingen standardfil för systemomfattande undertryckningsspecifikation.
            Ignore differences in the SONAME when doing a comparison


* Standardfil för användarens undertryckningsspecifikation
          • <b>--impacted-interfaces</b>


  Den hittas via den valfria miljövariabeln '''LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE'''. Om den miljövariabeln inte är satt försöker abidiff läsa undertryckningsfilen '''$HOME/.abignore'''. Om den filen inte finns laddas ingen standardfil för användarens undertryckningsspecifikation.
            When showing leaf changes, this option instructs abidiff to
            show the list of impacted interfaces. This option is thus to
            be used in addition the <b>--leaf-changes-only </b>option,
            otherwise, it's ignored.


== ALTERNATIV ==
          • <b>--keep </b>&lt;<i>regex</i>&gt;
'''--add-binaries1''' <''bin1,bin2,bin3,..''>
För var och en av de kommaseparerade binärer som anges som argument till detta alternativ: om binären hittas i katalogen som anges med alternativet '''--added-binaries-dir1''', så läser '''abidiff''' in ABI-korpusen för binären och lägger den till i en uppsättning korpusar (kallad en *ABI Corpus Group*) som inkluderar det första argumentet till '''abidiff'''.


Denna ABI-korpusgrupp jämförs sedan mot den andra korpusgruppen som anges som argument till '''abidiff'''.
            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, keep the globally
            defined functions and variables which names match the regular
            expression <i>regex</i>.  All other functions and variables are
            dropped on the floor and will thus not appear in the
            resulting diff report.


'''--add-binaries2''' <''bin1,bin2,bin3,..''>
          • <b>--keep-fn </b>&lt;<i>regex</i>&gt;
För var och en av de kommaseparerade binärer som anges som argument till detta alternativ: om binären hittas i katalogen som anges med alternativet '''--added-binaries-dir2''', så läser '''abidiff''' in ABI-korpusen för binären och lägger den till i en uppsättning korpusar (kallad en *ABI Corpus Group*) som inkluderar det andra argumentet till '''abidiff'''.


Denna ABI-korpusgrupp jämförs sedan mot den första korpusgruppen som anges som argument till '''abidiff'''.
            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, keep the globally
            defined functions which name match the regular expression
            <i>regex</i>.  All other functions are dropped on the floor and will
            thus not appear in the resulting diff report.


'''--added-binaries-dir1''' | '''--abd1''' <katalog-med-tilläggsbinärer-1>
          • <b>--keep-var </b>&lt;<i>regex</i>&gt;
Detta alternativ används tillsammans med alternativen '''--add-binaries1''', '''--follow-dependencies''' och '''--list-dependencies'''. Binärer som refereras av dessa alternativ – om de hittas i katalogen ''katalog-med-tilläggsbinärer-1'' – läses in som ABI-korpus och läggs till i den första ABI-korpusgruppen som ska användas vid jämförelsen.


'''--added-binaries-dir2''' | '''--abd2''' <katalog-med-tilläggsbinärer-2>
            When reading the <i>first-shared-library</i> and
Detta alternativ används tillsammans med alternativen '''--add-binaries2''', '''--follow-dependencies''' och '''--list-dependencies'''. Binärer som refereras av dessa alternativ – om de hittas i katalogen ''katalog-med-tilläggsbinärer-2'' – läses in som ABI-korpus och läggs till i den andra ABI-korpusgruppen som ska användas vid jämförelsen.
            <i>second-shared-library</i> ELF input files, keep the globally
            defined which names match the regular expression <i>regex</i>. All
            other variables are dropped on the floor and will thus not
            appear in the resulting diff report.


'''--added-fns'''
          • <b>--kmi-whitelist | -w </b>&lt;<i>path-to-whitelist</i>&gt;
I den resulterande rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa endast de globalt definierade funktioner som lades till i ''andra-delade-bibliotek''.


'''--added-vars'''
            When analyzing a Linux kernel binary, this option points to
I den resulterande rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa endast de globala variabler som lades till (definierades) i ''andra-delade-bibliotek''.
            the white list of names of ELF symbols of functions and
            variables which ABI must be considered.  That white list is
            called a "Kernel Module Interface white list".  This is
            because for the Kernel, we don't talk about <b>ABI</b>; we rather
            talk about the interface between the Kernel and its module.
            Hence the term <b>KMI </b>rather than <b>ABI</b>.


'''--allow-non-exported-interfaces'''
            Any other function or variable which ELF symbol are not
När verktyget tittar på felsökningsinformationen som följer med en binär analyserar det beskrivningarna av de typer som kan nås via gränssnitten (funktioner och variabler) som är synliga utanför sin översättningsenhet. När analysen är klar konstrueras en ABI-korpus genom att endast beakta den delmängd av typer som är nåbara från gränssnitt kopplade till [[ELF]]-symboler som är definierade och exporterade av binären. Det är dessa slutliga ABI-korpusar som jämförs av verktyget.
            present in that white list will not be considered by this
            tool.


Problemet med detta angreppssätt är dock att analys av alla gränssnitt som är synliga utanför sin översättningsenhet kan innebära mycket data, särskilt när binärerna är program (applikationer) snarare än delade bibliotek. Ett exempel på sådana applikationer är [[Linux-kärnan]]. Att analysera mycket stora ABI-korpusar som dessa kan vara extremt långsamt.
            If this option is not provided -- thus if no white list is
            provided -- then the entire KMI, that is, the set of all
            publicly defined and exported functions and global variables
            by the Linux Kernel binaries, is considered.


För en ”normalstor” binär har man däremot ofta råd att låta libabigail analysera alla gränssnitt som är synliga utanför sin översättningsenhet, genom att använda detta alternativ.
          • <b>--leaf-changes-only|-l </b>only show leaf changes, so don't show
            impact analysis report.  This option implies <b>--redundant</b>.


Observera att detta alternativ är aktiverat som standard, om vi inte befinner oss i fallet [[Linux-kärnan]].
            The typical output of abidiff when comparing two binaries
            looks like this


'''--btf'''
                $ abidiff libtest-v0.so libtest-v1.so
Vid jämförelse av binärer: extrahera ABI-information från [[BTF]]-felsökningsinformation, om sådan finns.
                Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                Variables changes summary: 0 Removed, 0 Changed, 0 Added variable


'''--changed-fns'''
                1 function with some indirect sub-type change:
I den resulterande rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa endast ändringar i undertyper för de globala funktioner som är definierade i ''första-delade-bibliotek''.


'''--changed-vars'''
                  [C]'function void fn(C&amp;)' at test-v1.cc:13:1 has some indirect sub-type changes:
I den resulterande rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa endast ändringar i undertyperna för de globala variabler som är definierade i ''första-delade-bibliotek''.
                    parameter 1 of type 'C&amp;' has sub-type changes:
                      in referenced type 'struct C' at test-v1.cc:7:1:
                        type size hasn't changed
                        1 data member change:
                        type of 'leaf* C::m0' changed:
                          in pointed to type 'struct leaf' at test-v1.cc:1:1:
                            type size changed from 32 to 64 bits
                            1 data member insertion:
                              'char leaf::m1', at offset 32 (in bits) at test-v1.cc:4:1


'''--ctf'''
                $
Vid jämförelse av binärer: extrahera ABI-information från [[CTF]]-felsökningsinformation, om sådan finns.


'''--debug-info-dir1''' | '''--d1''' <''di-sökväg1''>
            So in that example the report emits information about how the
För fall där felsökningsinformationen för ''första-delade-bibliotek'' är separerad till en egen fil anger detta var '''abidiff''' ska hitta den separata felsökningsinformationsfilen.
            data member insertion change of "struct leaf" is reachable
            from function "void fn(C&amp;)".  In other words, the report not
            only shows the data member change on "struct leaf", but it
            also shows the impact of that change on the function "void
            fn(C&amp;)".


Observera att ''di-sökväg'' måste peka på rotkatalogen under vilken felsökningsinformationen är organiserad i en trädstruktur. På Red Hat-baserade system är den katalogen vanligtvis '''<rot>/usr/lib/debug'''.
            In abidiff parlance, the change on "struct leaf" is called a
            leaf change.  So the <b>--leaf-changes-only</b>
            <b>--impacted-interfaces </b>options show, well, only the leaf
            change. And it goes like this:


Detta alternativ kan anges flera gånger med olika rotkataloger. I så fall kan '''abidiff''' leta i alla dessa rotkataloger efter den separata felsökningsinformationen för ''första-delade-bibliotek''.
                $ abidiff -l libtest-v0.so libtest-v1.so
                'struct leaf' changed:
                  type size changed from 32 to 64 bits
                  1 data member insertion:
                    'char leaf::m1', at offset 32 (in bits) at test-v1.cc:4:1


Observera också att detta alternativ inte är obligatoriskt för separerad felsökningsinformation som installerats av systemets pakethanterare, eftersom '''abidiff''' då vet var den finns.
                  one impacted interface:
                    function void fn(C&amp;)
                $


'''--debug-info-dir2''' | '''--d2''' <''di-sökväg2''>
            Note how the report ends by showing the list of interfaces
Som '''--debug-info-dir1''', men anger var '''abidiff''' ska hitta den separata felsökningsinformationen för ''andra-delade-bibliotek''.
            impacted by the leaf change.


Detta alternativ kan anges flera gånger med olika rotkataloger. I så fall kan '''abidiff''' leta i alla dessa rotkataloger efter den separata felsökningsinformationen för ''andra-delade-bibliotek''.
            Now if you don't want to see that list of impacted
            interfaces, then you can just avoid using the
            <b>--impacted-interface </b>option.  You can learn about that option
            below, in any case.


'''--debug-self-comparison'''
          • <b>--list-dependencies | --ldeps</b>
I detta läge skrivs felmeddelanden ut för typer som misslyckas med typkanonisering, i vissa situationer, när man jämför en binär mot sig själv.


När man jämför en binär mot sig själv bör kanoniska typer i den andra binären vara lika (så långt möjligt) de kanoniska typerna i den första binären. När avvikelser upptäcks i detta läge skickas en abort-signal och körningen stoppas. Alternativet är avsett att användas när man kör verktyget i en debugger, för felsökning.
            This option lists all the dependencies of the input arguments
            of <b>abidiff </b>that are found in the directories specified by the
            options <b>--added-binaries-dir1 </b>and <b>--added-binaries-dir2</b>


Detta är ett valfritt felsöknings- och rimlighetskontrollalternativ. För att aktivera det måste libabigail-paketet konfigureras med configure-alternativet '''--enable-debug-self-comparison'''.
          • <b>--no-added-syms</b>


'''--debug-tc'''
            In the resulting report about the differences between
I detta läge granskas processen för typkanonisering mycket noggrant. Under typkanoniseringen görs i praktiken varje typjämförelse två gånger: en gång i strukturellt läge (jämför varje undertyp medlem-för-medlem), och en gång med kanonisk jämförelse. De två jämförelserna ska ge samma resultat. Annars skickas en abort-signal och processen kan felsökas för att förstå varför de två jämförelsesätten ger olika resultat.
            <i>first-shared-library</i> and <i>second-shared-library</i>, do not
            display added functions or variables. Do not display added
            functions or variables ELF symbols either. All other kinds
            of changes are displayed unless they are explicitely
            forbidden by other options on the command line.


Detta är ett valfritt felsöknings- och rimlighetskontrollalternativ. För att aktivera det måste libabigail-paketet konfigureras med configure-alternativet '''--enable-debug-type-canonicalization'''.
          • <b>--no-assume-odr-for-cplusplus</b>


'''--deleted-fns'''
            When analyzing a binary originating from C++ code using �]8;;http://www.dwarfstd.org�\<i>DWARF</i>�]8;;�\
I den resulterande rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa endast de globalt definierade funktioner som raderades från ''första-delade-bibliotek''.
            debug information, libabigail assumes the �]8;;https://en.wikipedia.org/wiki/One_Definition_Rule�\<i>One Definition Rule</i>�]8;;�\
            to speed-up the analysis.  In that case, when several types
            have the same name in the binary, they are assumed to all be
            equal.


'''--deleted-vars'''
            This option disables that assumption and instructs libabigail
I den resulterande rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa endast de globalt definierade variabler som raderades från ''första-delade-bibliotek''.
            to actually actually compare the types to determine if they
            are equal.


'''--drop''' <''regex''>
          • <b>--no-architecture</b>
Vid inläsning av ELF-inmatningsfilerna ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': uteslut globalt definierade funktioner och variabler vars namn matchar det reguljära uttrycket ''regex''. Som följd kommer inga ändringar som rör dessa funktioner/variabler att tas med i diff-rapporten.


'''--drop-fn''' <''regex''>
            Do not take architecture in account when comparing ABIs.
Som '''--drop''', men gäller endast globalt definierade funktioner vars namn matchar ''regex''.


'''--drop-var''' <''regex''>
          • <b>--no-change-categorization | -x</b>
Vid inläsning av ELF-inmatningsfilerna ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': uteslut globalt definierade variabler som matchar det reguljära uttrycket ''regex''.


'''--drop-private-types'''
            This option disables the categorization of changes into
Detta alternativ används med alternativen '''--headers-dir1''', '''header-file1''', '''header-file2''' och '''--headers-dir2'''. Med detta alternativ tas typer som *INTE* är definierade i headerfilerna bort helt från den interna representation som Libabigail bygger upp för att representera ABI:t. De behöver då inte filtreras bort från den slutliga ABI-ändringsrapporten eftersom de inte ens finns i Libabigails representation.
            harmless and harmful changes.  Note that this categorization
            is a pre-requisite for the filtering of changes so this
            option disables that filtering.  The goal of this option is
            to speed-up the execution of the program for cases where the
            graph of changes is huge and where the user is just
            interested in looking at, for instance, leaf node changes
            without caring about their possible impact on interfaces.  In
            that case, this option would be used along with the
            <b>--leaf-changes-only </b>one.


Utan detta alternativ behålls dessa privata typer i den interna representationen och filtreras senare bort från rapporten.
          • <b>--no-corpus-path</b>


Detta alternativ kan därmed göra att Libabigail använder mindre minne. Det är främst avsett för att optimera minnesförbrukningen på binärer med många offentligt definierade och exporterade typer.
            Do not emit the path attribute for the ABI corpus.


'''--dump-diff-tree'''
          • <b>--no-default-suppression</b>
Efter diff-rapporten: skriv ut en textuell representation av trädet av diff-noder som jämförelsemotorn använder för att representera ändrade funktioner och variabler. Den representationen skrivs till felutmatningen för felsökningsändamål.


Observera att detta diff-träd endast är relevant för funktioner och variabler som har undertypsändringar. Tillagda eller borttagna funktioner/variabler har inget associerat diff-nodträd.
            Do not load the <i>default suppression specification files</i>.


'''--exported-interfaces-only'''
          • <b>--no-harmful</b>
Som standard analyserar verktyget (via felsökningsinformation) typer som är nåbara från gränssnitt som är synliga utanför sin översättningsenhet. Därefter konstrueras en ABI-korpus genom att endast beakta den delmängd av typer som är nåbara från gränssnitt associerade med definierade och exporterade [[ELF]]-symboler. Det är dessa slutliga ABI-korpusar som jämförs.


Detta kan vara mycket långsamt för stora applikationsbinärer, som till exempel [[Linux-kärnan]]. För att mildra prestandaproblemet tillåter detta alternativ att libabigail endast analyserar typer som är nåbara från gränssnitt associerade med definierade och exporterade [[ELF]]-symboler.
            In the diff report, do not display the <i>harmful</i> changes. By
            default, only the harmful changes are displayed in diff
            report.


Observera att detta alternativ är aktiverat som standard när man analyserar [[Linux-kärnan]]. Annars är det avstängt som standard.
          • <b>--no-leverage-dwarf-factorization</b>


'''--fail-no-debug-info'''
            When analyzing a binary which �]8;;http://www.dwarfstd.org�\<i>DWARF</i>�]8;;�\ debug information was
Om ingen felsökningsinformation hittas gör detta alternativ att programmet misslyckas (avslutar med fel). Utan detta alternativ försöker programmet jämföra egenskaper som inte är kopplade till felsökningsinfo, som rena ELF-egenskaper.
            processed with the �]8;;https://sourceware.org/dwz�\<i>DWZ</i>�]8;;�\ tool, the type information is supposed
            to be already factorized.  That context is used by libabigail
            to perform some speed optimizations.


'''--follow-dependencies''' | '''--fdeps'''
            This option disables those optimizations.
För varje beroende till det första argumentet till '''abidiff''': om beroendet hittas i katalogen som anges med '''--added-binaries-dir1''', konstrueras en ABI-korpus av beroendet och läggs till i en *ABI Corpus Group* som inkluderar det första argumentet.


På samma sätt för varje beroende till det andra argumentet: om beroendet hittas i katalogen som anges med '''--added-binaries-dir2''', konstrueras en ABI-korpus av beroendet och läggs till i en ABI-korpusgrupp som inkluderar det andra argumentet.
          • <b>--no-linkage-name</b>


Dessa två ABI-korpusgrupper jämförs sedan mot varandra.
            In the resulting report, do not display the linkage names of
            the added, removed, or changed functions or variables.


Med andra ord: detta gör att '''abidiff''' jämför uppsättningen bestående av den första inmatningen och dess beroenden mot uppsättningen bestående av den andra inmatningen och dess beroenden.
          • <b>--no-linux-kernel-mode</b>


'''--harmless'''
            Without this option, if abidiff detects that the binaries it
I diff-rapporten: visa endast de *ofarliga* ändringarna. Som standard filtreras de ofarliga ändringarna bort ur rapporten för att hålla den mindre rörig och göra det lättare att upptäcka verkliga ABI-problem.
            is looking at are Linux Kernel binaries (either vmlinux or
            modules) then it only considers functions and variables which
            ELF symbols are listed in the __ksymtab and __ksymtab_gpl
            sections.


'''--headers-dir1''' | '''--hd1''' <sökväg-till-headers-katalog-1>
            With this option, abidiff considers the binary as a
Anger var de publika headerfilerna för det första delade biblioteket (eller binären i allmänhet) finns, som verktyget ska ta hänsyn till. Verktyget filtrerar då bort ABI-ändringar för typer som inte är definierade i publika headerfiler.
            non-special ELF binary.  It thus considers functions and
            variables which are defined and exported in the ELF sense.


Observera att flera publika headerkataloger kan anges för det första delade biblioteket. Då ska alternativet '''--headers-dir1''' finnas med flera gånger på kommandoraden, t.ex.:
          • <b>--no-redundant</b>


<pre>
            In the diff report, do <i>NOT</i> display redundant changes.  A
$ abidiff --headers-dir1 /some/path      \
            redundant change is a change that has been displayed
           --headers-dir1 /some/other/path \
            elsewhere in the report.  This option is switched on by
           binary-version-1 binary-version-2
            default.
</pre>
 
          • <b>--no-show-locs</b>
              Do not show information about where in the <i>second shared</i>
              <i>library</i> the respective type was changed.
 
          • <b>--no-show-relative-offset-changes</b>
 
            Without this option, when the offset of a data member
            changes, the change report not only mentions the older and
            newer offset, but it also mentions by how many bits the data
            member changes.  With this option, the latter is not shown.
 
          • <b>--no-unreferenced-symbols</b>
 
            In the resulting report, do not display change information
            about function and variable symbols that are not referenced
            by any debug information.  Note that for these symbols not
            referenced by any debug information, the change information
            displayed is either added or removed symbols.
 
          • <b>--non-reachable-types|-t</b>
 
            Analyze and emit change reports for all the types of the
            binary, including those that are not reachable from global
            functions and variables.
 
            This option might incur some serious performance degradation
            as the number of types analyzed can be huge.  However, if
            paired with the <b>--headers-dir{1,2} </b>and/or <b>header-file{1,2}</b>
            options, the additional non-reachable types analyzed are
            restricted to those defined in public headers files, thus
            hopefully making the performance hit acceptable.
 
            Also, using this option alongside suppression specifications
            (by also using the <b>--suppressions </b>option) might help keep the
            number of analyzed types (and the potential performance
            degradation) in control.
 
            Note that without this option, only types that are reachable
            from global functions and variables are analyzed, so the tool
            detects and reports changes on these reachable types only.
 
          • <b>--redundant</b>
 
            In the diff report, do display redundant changes.  A
            redundant change is a change that has been displayed
            elsewhere in the report.
 
          • <b>--show-bits</b>
 
            Show sizes and offsets in bits, not bytes.  This option is
            activated by default.
 
           • <b>--show-bytes</b>
 
            Show sizes and offsets in bytes, not bits.  By default, sizes
            and offsets are shown in bits.
 
          • <b>--show-dec</b>
 
            Show sizes and offsets in decimal base.  This option is
            activated by default.
 
          • <b>--show-hex</b>
 
            Show sizes and offsets in hexadecimal base.
 
           • <b>--stat</b>
 
            Rather than displaying the detailed ABI differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, just display
            some summary statistics about these differences.
 
          • <b>--stats</b>
 
            Emit statistics about various internal things.


'''--headers-dir2''' | '''--hd2''' <sökväg-till-headers-katalog-2>
          • <b>--suppressions | --suppr </b>&lt;<i>path-to-suppressions</i>&gt;
Som '''--headers-dir1''', men för det andra delade biblioteket. Flera kataloger kan anges på samma sätt.


'''--header-file1''' | '''--hf1''' <sökväg-till-headerfil-1>
            Use a <i>suppression specification</i> file located at
Anger var en publik headerfil för det första delade biblioteket finns, som verktyget ska ta hänsyn till. Verktyget filtrerar då bort ABI-ändringar för typer som inte är definierade i publika headerfiler.
            <i>path-to-suppressions</i>.  Note that this option can appear
            multiple times on the command line.  In that case, all of the
            provided suppression specification files are taken into
            account.


'''--header-file2''' | '''--hf2''' <sökväg-till-headerfil-2>
            Please note that, by default, if this option is not provided,
Som '''--header-file1''', men för det andra delade biblioteket.
            then the <i>default suppression specification files</i> are loaded .


'''--help''' | '''-h'''
          • <b>--symtabs</b>
Visa en kort hjälp om kommandot och avsluta.


'''--ignore-soname'''
            Only display the symbol tables of the <i>first-shared-library</i>
Ignorera skillnader i SONAME vid jämförelse.
            and <i>second-shared-library</i>.


'''--impacted-interfaces'''
          • <b>--verbose</b>
När man visar *leaf changes* instruerar detta alternativ '''abidiff''' att visa listan över påverkade gränssnitt. Alternativet ska användas tillsammans med '''--leaf-changes-only''', annars ignoreras det.


'''--keep''' <''regex''>
            Emit verbose logs about the progress of miscellaneous
Vid inläsning av ELF-inmatningsfilerna ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': behåll globalt definierade funktioner och variabler vars namn matchar ''regex''. Alla andra funktioner och variabler kastas bort och kommer därför inte att synas i diff-rapporten.
            internal things.


'''--keep-fn''' <''regex''>
          • <b>--version | -v</b>
Som '''--keep''', men gäller endast funktioner.


'''--keep-var''' <''regex''>
            Display the version of the program and exit.
Vid inläsning av ELF-inmatningsfilerna ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': behåll globala variabler vars namn matchar ''regex''. Alla andra variabler kastas bort och syns inte i diff-rapporten.
</pre>
<h2><a id="RETURN_VALUES" href="#RETURN_VALUES"></a>RETURN VALUES  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
      The exit code of the <b>abidiff </b>command is either 0 if the ABI of the
      binaries being compared are equal, or non-zero if they differ or
      if the tool encountered an error.


'''--kmi-whitelist''' | '''-w''' <''sökväg-till-vitlista''>
      In the later case, the exit code is a 8-bits-wide bit field in
Vid analys av en Linux-kärnbinär pekar detta alternativ ut vitlistan över namn på ELF-symboler för funktioner och variabler vars gränssnitt ska beaktas. Vitlistan kallas en ”Kernel Module Interface white list”, eftersom man för kärnan normalt talar om gränssnittet mellan kärnan och moduler (KMI) snarare än ABI.
      which each bit has a specific meaning.


Alla andra funktioner/variabler vars ELF-symboler inte finns i vitlistan tas inte med.
      The first bit, of value 1, named <b>ABIDIFF_ERROR </b>means there was an
      error.


Om alternativet inte anges (ingen vitlista) beaktas hela KMI:t, dvs. alla offentligt definierade och exporterade funktioner och globala variabler i Linux-kärnans binärer.
      The second bit, of value 2, named <b>ABIDIFF_USAGE_ERROR </b>means there
      was an error in the way the user invoked the tool. It might be
      set, for instance, if the user invoked the tool with an unknown
      command line switch, with a wrong number or argument, etc.  If
      this bit is set, then the <b>ABIDIFF_ERROR </b>bit must be set as well.


'''--leaf-changes-only'''|'''-l'''
      The third bit, of value 4, named <b>ABIDIFF_ABI_CHANGE </b>means the ABI
Visa endast *leaf changes*, dvs. visa inte rapporten om konsekvens-/påverkansanalys. Detta alternativ implicerar '''--redundant'''.
      of the binaries being compared are different.


(Textexemplen i originalmanualen är kod/utdata; säg till om du vill att jag tar med dem i MediaWiki som <pre>-block i samma stil som dina andra sidor.)
      The fourth bit, of value 8, named <b>ABIDIFF_ABI_INCOMPATIBLE_CHANGE</b>
      means the ABI of the binaries compared are different in an
      incompatible way.  If this bit is set, then the <b>ABIDIFF_ABI_CHANGE</b>
      bit must be set as well.  If the <b>ABIDIFF_ABI_CHANGE </b>is set and the
      <b>ABIDIFF_INCOMPATIBLE_CHANGE </b>is <i>NOT</i> set, then it means that the
      ABIs being compared might or might not be compatible.  In that
      case, a human being needs to review the ABI changes to decide if
      they are compatible or not.


'''--list-dependencies''' | '''--ldeps'''
      Note that, at the moment, there are only a few kinds of ABI
Listar alla beroenden till indataargumenten till '''abidiff''' som hittas i katalogerna som anges av '''--added-binaries-dir1''' och '''--added-binaries-dir2'''.
      changes that would result in setting the flag
      <b>ABIDIFF_ABI_INCOMPATIBLE_CHANGE</b>. Those ABI changes are either:


'''--no-added-syms'''
          • the removal of the symbol of a function or variable that has
I rapporten om skillnader mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa inte tillagda funktioner eller variabler. Visa inte heller tillagda ELF-symboler för funktioner/variabler. Alla andra sorters ändringar visas, såvida de inte uttryckligen förbjuds av andra alternativ.
            been defined and exported.


'''--no-assume-odr-for-cplusplus'''
          • the modification of the index of a member of a virtual
När libabigail analyserar en binär som kommer från C++-kod med [[DWARF]]-felsökningsinformation antar den *One Definition Rule* (ODR) för att snabba upp analysen. Det betyder att om flera typer har samma namn i binären antas de vara lika.
            function table (for C++ programs and libraries).


Detta alternativ stänger av det antagandet och instruerar libabigail att faktiskt jämföra typerna för att avgöra om de är lika.
      With time, when more ABI change patterns are found to <i>always</i>
      constitute incompatible ABI changes, we will adapt the code to
      recognize those cases and set the <b>ABIDIFF_ABI_INCOMPATIBLE_CHANGE</b>
      accordingly.  So, if you find such patterns, please let us know.


'''--no-architecture'''
      The remaining bits are not used for the moment.
Ta inte hänsyn till arkitektur vid jämförelse av ABI:er.
</pre>
<h2><a id="USAGE_EXAMPLES" href="#USAGE_EXAMPLES"></a>USAGE EXAMPLES  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
          1. Detecting an ABI change in a sub-type of a function:


'''--no-change-categorization''' | '''-x'''
                $ cat -n test-v0.cc
Stänger av kategorisering av ändringar i ofarliga/skadliga ändringar. Eftersom kategoriseringen krävs för filtrering av ändringar stänger detta alternativ också av filtreringen.
                          1      // Compile this with:
                          2      //  g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                          3
                          4      struct S0
                          5      {
                          6        int m0;
                          7      };
                          8
                          9      void
                        10      foo(S0* /*parameter_name*/)
                        11      {
                        12        // do something with parameter_name.
                        13      }
                $
                $ cat -n test-v1.cc
                          1      // Compile this with:
                          2      //  g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                          3
                          4      struct type_base
                          5      {
                          6        int inserted;
                          7      };
                          8
                          9      struct S0 : public type_base
                        10      {
                        11        int m0;
                        12      };
                        13
                        14      void
                        15      foo(S0* /*parameter_name*/)
                        16      {
                        17        // do something with parameter_name.
                        18      }
                $
                $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                $
                $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                Variables changes summary: 0 Removed, 0 Changed, 0 Added variable


Syftet är att snabba upp körningen i fall där ändringsgrafen är enorm och användaren t.ex. bara vill titta på *leaf changes* utan att bry sig om påverkan på gränssnitt. Då används alternativet ofta tillsammans med '''--leaf-changes-only'''.
                1 function with some indirect sub-type change:


'''--no-corpus-path'''
                  [C]'function void foo(S0*)' has some indirect sub-type changes:
Skriv inte ut sökvägsattributet för ABI-korpusen.
                        parameter 0 of type 'S0*' has sub-type changes:
                          in pointed to type 'struct S0':
                            size changed from 32 to 64 bits
                            1 base class insertion:
                              struct type_base
                            1 data member change:
                              'int S0::m0' offset changed from 0 to 32
                exit code: 4
                $


'''--no-default-suppression'''
      Note how the exit code is 4, meaning the third bit
Ladda inte standardfilerna för undertryckningsspecifikationer.
      ABIDIFF_ABI_CHANGE of value 4 is set to 1.  This means the tool
      categorizes the ABI change as <i>harmful</i> and thus requires a user
      review.


'''--no-harmful'''
          2. Detecting an incompatible ABI change in the type of a
Visa inte *skadliga* ändringar i diff-rapporten. Som standard visas endast de skadliga ändringarna i diff-rapporten.
            function:


'''--no-leverage-dwarf-factorization'''
                $ cat -n test-v0.cc
När en binärs [[DWARF]]-felsökningsinformation har bearbetats med verktyget [[dwz]] antas typinformationen redan vara faktoriserad, vilket libabigail använder för prestandaoptimeringar.
                      1  // Compile this with:
                      2  //  g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                      3
                      4  struct S0
                      5  {
                      6    int m0;
                      7  };
                      8
                      9  S0
                    10  foo()
                    11  {
                    12    S0 s = {};
                    13    return s;
                    14  }
                $
                $ cat -n test-v1.cc
                      1  // Compile this with:
                      2  //  g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                      3
                      4  struct type_base
                      5  {
                      6    int inserted;
                      7  };
                      8
                      9  struct S0 : public type_base
                    10  {
                    11    int m0;
                    12  };
                    13
                    14  S0
                    15  foo()
                    16  {
                    17    S0 s = {};
                    18    return s;
                    19  }
                $
                $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                $
                $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                Variables changes summary: 0 Removed, 0 Changed, 0 Added variable


Detta alternativ stänger av dessa optimeringar.
                1 function with incompatible sub-type changes:


'''--no-linkage-name'''
                  [C] 'function S0 foo(void)' at test-v0.cc:10:1 has some sub-type changes:
Visa inte länk-namnen (*linkage names*) för tillagda, borttagna eller ändrade funktioner/variabler i rapporten.
                    return type changed:
                      type size changed from 32 to 64 (in bits)
                      1 base class insertion:
                        struct type_base at test-v1.cc:4:1
                      1 data member change:
                        'int m0' offset changed from 0 to 32 (in bits) (by +32 bits)


'''--no-linux-kernel-mode'''
                exit code: 12
Utan detta alternativ, om abidiff upptäcker att binärerna är Linux-kärnans binärer (antingen vmlinux eller moduler), så beaktas endast funktioner/variabler vars ELF-symboler finns listade i sektionerna __ksymtab och __ksymtab_gpl.
                $


Med detta alternativ behandlar abidiff binären som en vanlig ELF-binär och beaktar funktioner/variabler som är definierade och exporterade i ELF-mening.
      Note how the exit code is 12, meaning both the third bit
      ABIDIFF_ABI_CHANGE of value 4 and the fourth bit
      ABIDIFF_ABI_INCOMPATIBLE_CHANGE of value 8 are set to 1.  This
      means the tool categorizes the ABI change as <i>incompatible</i>.  It's
      an ABI break.


'''--no-redundant'''
          3. Detecting another change in a sub-type of a function:
Visa *INTE* redundanta ändringar i diff-rapporten. En redundant ändring är en ändring som redan visats någon annanstans i rapporten. Detta alternativ är aktiverat som standard.


'''--no-show-locs'''
                $ cat -n test-v0.cc
Visa inte information om var i ''det andra delade biblioteket'' den aktuella typen ändrades.
                          1      // Compile this with:
                          2      //  g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                          3
                          4      struct S0
                          5      {
                          6        int m0;
                          7      };
                          8
                          9      void
                        10      foo(S0&amp; /*parameter_name*/)
                        11      {
                        12        // do something with parameter_name.
                        13      }
                $
                $ cat -n test-v1.cc
                          1      // Compile this with:
                          2      //  g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                          3
                          4      struct S0
                          5      {
                          6        char inserted_member;
                          7        int m0;
                          8      };
                          9
                        10      void
                        11      foo(S0&amp; /*parameter_name*/)
                        12      {
                        13        // do something with parameter_name.
                        14      }
                $
                $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                $
                $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                Variables changes summary: 0 Removed, 0 Changed, 0 Added variable


'''--no-show-relative-offset-changes'''
                1 function with some indirect sub-type change:
Utan detta alternativ: när offset för en datamedlem ändras nämner rapporten både gammal och ny offset, samt med hur många bitar datamedlemmen flyttats. Med detta alternativ visas inte det sistnämnda.


'''--no-unreferenced-symbols'''
                  [C]'function void foo(S0&amp;)' has some indirect sub-type changes:
Visa inte ändringsinformation om funktions- och variabelsymboler som inte refereras av någon felsökningsinformation. För symboler som inte refereras av felsökningsinfo är ändringsinformationen som visas antingen ”tillagd” eller ”borttagen” symbol.
                        parameter 0 of type 'S0&amp;' has sub-type changes:
                          in referenced type 'struct S0':
                            size changed from 32 to 64 bits
                            1 data member insertion:
                              'char S0::inserted_member', at offset 0 (in bits)
                            1 data member change:
                              'int S0::m0' offset changed from 0 to 32


'''--non-reachable-types'''|'''-t'''
                exit code: 4
Analysera och rapportera ändringar för alla typer i binären, inklusive de som inte är nåbara från globala funktioner och variabler.
                $


Detta kan ge kraftig prestandaförsämring eftersom antalet analyserade typer kan vara mycket stort. Om alternativet kombineras med '''--headers-dir{1,2}''' och/eller '''header-file{1,2}''' begränsas de extra, icke-nåbara typerna till dem som definieras i publika headerfiler, vilket kan göra prestandasmällen acceptabel.
          4. Detecting that functions got removed or added to a library:


Att använda detta tillsammans med undertryckningsspecifikationer (via '''--suppressions''') kan också hjälpa till att hålla antalet analyserade typer under kontroll.
                $ cat -n test-v0.cc
                          1      // Compile this with:
                          2      //  g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                          3
                          4      struct S0
                          5      {
                          6        int m0;
                          7      };
                          8
                          9      void
                        10      foo(S0&amp; /*parameter_name*/)
                        11      {
                        12        // do something with parameter_name.
                        13      }
                $
                $ cat -n test-v1.cc
                          1      // Compile this with:
                          2      //  g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                          3
                          4      struct S0
                          5      {
                          6        char inserted_member;
                          7        int m0;
                          8      };
                          9
                        10      void
                        11      bar(S0&amp; /*parameter_name*/)
                        12      {
                        13        // do something with parameter_name.
                        14      }
                $
                $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                $
                $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                Functions changes summary: 1 Removed, 0 Changed, 1 Added functions
                Variables changes summary: 0 Removed, 0 Changed, 0 Added variable


Observera att utan detta alternativ analyseras endast typer som är nåbara från globala funktioner och variabler, och verktyget rapporterar då bara ändringar för dessa nåbara typer.
                1 Removed function:
                  'function void foo(S0&amp;)'    {_Z3fooR2S0}


'''--redundant'''
                1 Added function:
Visa redundanta ändringar i diff-rapporten. En redundant ändring är en ändring som redan visats någon annanstans i rapporten.
                  'function void bar(S0&amp;)'   {_Z3barR2S0}


'''--show-bits'''
                exit code: 12
Visa storlekar och offset i bitar, inte byte. Detta alternativ är aktiverat som standard.
                $


'''--show-bytes'''
          5. Comparing two sets of binaries that are passed on the
Visa storlekar och offset i byte, inte bitar. Som standard visas storlekar och offset i bitar.
            command line:


'''--show-dec'''
                $ abidiff --add-binaries1=file2-v1              \
Visa storlekar och offset i decimalform. Detta alternativ är aktiverat som standard.
                          --add-binaries2=file2-v2,file2-v1    \
                          --added-binaries-dir1 dir1            \
                          --added-binaries-dir2 dir2            \
                          file1-v1 file1-v2


'''--show-hex'''
            Note that the files <b>file2-v1</b>, and <b>file2-v2 </b>are to be found
Visa storlekar och offset i hexadecimalt.
            in <b>dir1 </b>and <b>dir2 </b>or in the current directory.


'''--stat'''
          6. Compare two libraries and their dependencies:
Istället för att visa de detaljerade ABI-skillnaderna mellan ''första-delade-bibliotek'' och ''andra-delade-bibliotek'': visa bara sammanfattande statistik om skillnaderna.


'''--stats'''
                $ abidiff --follow-dependencies                      \
Skriv ut statistik om olika interna saker.
                          --added-binaries-dir1 /some/where          \
                          --added-binaries-dir2 /some/where/else    \
                          foo bar


'''--suppressions''' | '''--suppr''' <''sökväg-till-undertryckningar''>
            This compares the set of binaries comprised by <b>foo </b>and its
Använd en fil med undertryckningsspecifikationer som finns på ''sökväg-till-undertryckningar''. Alternativet kan anges flera gånger; då tas alla angivna undertryckningsfiler med i beräkningen.
            dependencies against the set of binaries comprised by <b>bar</b>
            and its dependencies.
</pre>
<h2><a id="AUTHOR" href="#AUTHOR"></a>AUTHOR  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
      Dodji Seketeli
</pre>
<h2><a id="COPYRIGHT" href="#COPYRIGHT"></a>COPYRIGHT  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
      2014-2025, Red Hat, Inc.
</pre>
<h2><a id="COLOPHON" href="#COLOPHON"></a>COLOPHON  &nbsp; &nbsp; &nbsp; &nbsp; <a href="#top_of_page"><span class="top-link">top</span></a></h2><pre>
      This page is part of the <i>libabigail</i> (ABI Generic Analysis and
      Instrumentation Library) project.  Information about the project
      can be found at ⟨<a href="https://sourceware.org/libabigail/">https://sourceware.org/libabigail/</a>⟩.  If you have
      a bug report for this manual page, see
      ⟨<a href="http://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail">http://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail</a>⟩.
      This page was obtained from the project's upstream Git repository
      ⟨git://sourceware.org/git/libabigail.git⟩ on 2025-08-11.  (At that
      time, the date of the most recent commit that was found in the
      repository was 2025-07-28.)  If you discover any rendering
      problems in this HTML version of the page, or you believe there is
      a better or more up-to-date source for the page, or you have
      corrections or improvements to the information in this COLOPHON
      (which is <i>not</i> part of the original manual page), send a mail to
      man-pages@man7.org


Observera att om detta alternativ inte anges, laddas standardfilerna för undertryckningsspecifikationer.
<span class="footline">                              Aug 11, 2025                    <i>ABIDIFF</i>(1)</span>
</pre>


'''--symtabs'''
<hr class="end-man-text" />
Visa endast symboltabellerna för ''första-delade-bibliotek'' och ''andra-delade-bibliotek''.


'''--verbose'''
Skriv ut utförliga loggar om förloppet för diverse interna saker.
<hr class="start-footer" />


'''--version''' | '''-v'''
<div class="footer">
Visa programmets version och avsluta.


---
<table class="colophon-table">
    <tr>
    <td class="pub-info">
        <p>
            HTML rendering created 2025-09-06
            by <a href="https://man7.org/mtk/index.html">Michael Kerrisk</a>,
            author of
            <a href="https://man7.org/tlpi/"><em>The Linux Programming Interface</em></a>.
        </p>
        <p>
            For details of in-depth
            <strong>Linux/UNIX system programming training courses</strong>
            that I teach, look <a href="https://man7.org/training/">here</a>.
        </p>
        <p>
            Hosting by <a href="https://www.jambit.com/index_en.html">jambit GmbH</a>.
        </p>
    </td>
    <td class="colophon-divider">
    </td>
    <td class="tlpi-cover">
        <a href="https://man7.org/tlpi/"><img src="https://man7.org/tlpi/cover/TLPI-front-cover-vsmall.png" alt="Cover of TLPI" /></a>
    </td>
    </tr>
</table>


Om du klistrar in **resten av OPTIONS + RETURN VALUES + USAGE EXAMPLES + AUTHOR + COPYRIGHT + COLOPHON** (eller bara ger länken), kan jag fortsätta i exakt samma MediaWiki-stil och ta med exempelblocken som `<pre>` precis som du brukar göra.
</div>

Versionen från 10 januari 2026 kl. 06.40

abidiff(1) — Linux manual page


<a href="#NAME">NAME</a> | <a href="#INVOCATION">INVOCATION</a> | <a href="#ENVIRONMENT">ENVIRONMENT</a> | <a href="#OPTIONS">OPTIONS</a> | <a href="#RETURN_VALUES">RETURN VALUES</a> | <a href="#USAGE_EXAMPLES">USAGE EXAMPLES</a> | <a href="#AUTHOR">AUTHOR</a> | <a href="#COPYRIGHT">COPYRIGHT</a> | <a href="#COLOPHON">COLOPHON</a>

<span class="headline"><i>ABIDIFF</i>(1)                      Libabigail                     <i>ABIDIFF</i>(1)</span>

<a id="NAME" href="#NAME"></a>NAME         <a href="#top_of_page">top</a>

       abidiff - compare ABIs of ELF files

       abidiff compares the Application Binary Interfaces (ABI) of two
       shared libraries in �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ format.  It emits a meaningful report
       describing the differences between the two ABIs.

       This tool can also compare the textual representations of the ABI
       of two ELF binaries (as emitted by <b>abidw</b>) or an ELF binary against
       a textual representation of another ELF binary.

       For a comprehensive ABI change report between two input shared
       libraries that includes changes about function and variable
       sub-types, <b>abidiff </b>uses by default, debug information in �]8;;http://www.dwarfstd.org�\<i>DWARF</i>�]8;;�\
       format, if present, otherwise it compares interfaces using debug
       information in �]8;;https://raw.githubusercontent.com/wiki/oracle/binutils-gdb/files/ctf-spec.pdf�\<i>CTF</i>�]8;;�\ or �]8;;https://docs.kernel.org/bpf/btf.html�\<i>BTF</i>�]8;;�\ formats, if present. Finally, if no
       debug info in these formats is found, it only considers �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\
       symbols and report about their addition or removal.

       This tool uses the libabigail library to analyze the binary as
       well as its associated debug information.  Here is its general
       mode of operation.

       When instructed to do so, a binary and its associated debug
       information is read and analyzed.  To that effect, libabigail
       analyzes by default the descriptions of the types reachable by the
       interfaces (functions and variables) that are visible outside of
       their translation unit.  Once that analysis is done, an
       Application Binary Interface Corpus is constructed by only
       considering the subset of types reachable from interfaces
       associated to �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ symbols that are defined and exported by the
       binary.  It's that final ABI corpus which libabigail considers as
       representing the ABI of the analyzed binary.

       Libabigail then has capabilities to generate textual
       representations of ABI Corpora, compare them, analyze their
       changes and report about them.

<a id="INVOCATION" href="#INVOCATION"></a>INVOCATION         <a href="#top_of_page">top</a>

          abidiff [options] <first-shared-library> <second-shared-library>

<a id="ENVIRONMENT" href="#ENVIRONMENT"></a>ENVIRONMENT         <a href="#top_of_page">top</a>

       abidiff loads two default <i>suppression specifications files</i>, merges
       their content and use it to filter out ABI change reports that
       might be considered as false positives to users.

       • Default system-wide suppression specification file

         It's located by the optional environment variable
         LIBABIGAIL_DEFAULT_SYSTEM_SUPPRESSION_FILE.  If that environment
         variable is not set, then abidiff tries to load the suppression
         file $libdir/libabigail/libabigail-default.abignore.  If that
         file is not present, then no default system-wide suppression
         specification file is loaded.

       • Default user suppression specification file.

         It's located by the optional environment
         LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE.  If that environment
         variable is not set, then abidiff tries to load the suppression
         file $HOME/.abignore.  If that file is not present, then no
         default user suppression specification is loaded.

<a id="OPTIONS" href="#OPTIONS"></a>OPTIONS         <a href="#top_of_page">top</a>

          • <b>--add-binaries1 </b><<i>bin1,bin2,bin3,..</i>>

            For each of the comma-separated binaries given in argument to
            this option, if the binary is found in the directory
            specified by the <b>--added-binaries-dir1 </b>option, then <b>abidiff</b>
            loads the ABI corpus of the binary and adds it to a set of
            corpora (called an ABI Corpus Group) that includes the first
            argument of <b>abidiff</b>.

            That ABI corpus group is then compared against the second
            corpus group given in argument to <b>abidiff</b>.

          • <b>--add-binaries2 </b><<i>bin1,bin2,bin3,..</i>>

            For each of the comma-separated binaries given in argument to
            this option, if the binary is found in the directory
            specified by the <b>--added-binaries-dir2 </b>option, then <b>abidiff</b>
            loads the ABI corpus of the binary and adds it to a set of
            corpora(called an ABI Corpus Group) that includes the second
            argument of <b>abidiff</b>.

            That ABI corpus group is then compared against the first
            corpus group given in argument to <b>abidiff</b>.

          • <b>--added-binaries-dir1 | --abd1 </b><added-binaries-directory-1>

            This option is to be used in conjunction with the
            <b>--add-binaries1</b>, <b>--follow-dependencies </b>and
            <b>--list-dependencies </b>options.  Binaries referred to by these
            options, if found in the directory
            <i>added-binaries-directory-1</i>, are loaded as ABI corpus and are
            added to the first ABI corpus group that is to be used in the
            comparison.

          • <b>--added-binaries-dir2 | --abd2 </b><added-binaries-directory-2>

            This option is to be used in conjunction with the
            <b>--add-binaries2</b>, <b>--follow-dependencies </b>and
            <b>--list-dependencies </b>options.  Binaries referred to by these
            options, if found in the directory
            <i>added-binaries-directory-2</i>, are loaded as ABI corpus and are
            added to the second ABI corpus group to be used in the
            comparison.

          • <b>--added-fns</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the globally defined functions that were added to
            <i>second-shared-library</i>.

          • <b>--added-vars</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the global variables that were added (defined) to
            <i>second-shared-library</i>.

          • <b>--allow-non-exported-interfaces</b>

            When looking at the debug information accompanying a binary,
            this tool analyzes the descriptions of the types reachable by
            the interfaces (functions and variables) that are visible
            outside of their translation unit.  Once that analysis is
            done, an ABI corpus is constructed by only considering the
            subset of types reachable from interfaces associated to �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\
            symbols that are defined and exported by the binary.  It's
            those final ABI Corpora that are compared by this tool.

            The problem with that approach however is that analyzing all
            the interfaces that are visible from outside their
            translation unit can amount to a lot of data, especially when
            those binaries are applications, as opposed to shared
            libraries.  One example of such applications is the �]8;;https://kernel.org/�\<i>Linux</i>
            <i>Kernel</i>�]8;;�\.  Analyzing massive ABI Corpora like these can be
            extremely slow.

            In the presence of an "average sized" binary however one can
            afford having libabigail analyze all interfaces that are
            visible outside of their translation unit, using this option.

            Note that this option is turned on by default, unless we are
            in the presence of the �]8;;https://kernel.org/�\<i>Linux Kernel</i>�]8;;�\.

          • <b>--btf</b>

            When comparing binaries, extract ABI information from �]8;;https://docs.kernel.org/bpf/btf.html�\<i>BTF</i>�]8;;�\
            debug information, if present.

          • <b>--changed-fns</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the changes in sub-types of the global functions defined in
            <i>first-shared-library</i>.

          • <b>--changed-vars</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the changes in the sub-types of the global variables defined
            in <i>first-shared-library</i>

          • <b>--ctf</b>

            When comparing binaries, extract ABI information from �]8;;https://raw.githubusercontent.com/wiki/oracle/binutils-gdb/files/ctf-spec.pdf�\<i>CTF</i>�]8;;�\
            debug information, if present.

          • <b>--debug-info-dir1 | --d1 </b><<i>di-path1</i>>

            For cases where the debug information for
            <i>first-shared-library</i> is split out into a separate file, tells
            <b>abidiff </b>where to find that separate debug information file.

            Note that <i>di-path</i> must point to the root directory under
            which the debug information is arranged in a tree-like
            manner.  Under Red Hat based systems, that directory is
            usually <b><root>/usr/lib/debug</b>.

            This option can be provided several times with different root
            directories.  In that case, <b>abidiff </b>will potentially look
            into all those root directories to find the split debug info
            for <i>first-shared-library</i>.

            Note also that this option is not mandatory for split debug
            information installed by your system's package manager
            because then <b>abidiff </b>knows where to find it.

          • <b>--debug-info-dir2 | --d2 </b><<i>di-path2</i>>

            Like <b>--debug-info-dir1</b>, this options tells <b>abidiff </b>where to
            find the split debug information for the
            <i>second-shared-library</i> file.

            This option can be provided several times with different root
            directories.  In that case, <b>abidiff </b>will potentially look
            into all those root directories to find the split debug info
            for <i>second-shared-library</i>.

          • <b>--debug-self-comparison</b>

            In this mode, error messages are emitted for types which fail
            type canonicalization, in some circumstances, when comparing
            a binary against itself.

            When comparing a binary against itself, canonical types of
            the second binary should be equal (as much as possible) to
            canonical types of the first binary.  When some discrepancies
            are detected in this mode, an abort signal is emitted and
            execution is halted.  This option should be used while
            executing the tool in a debugger, for troubleshooting
            purposes.

            This is an optional debugging and sanity check option.  To
            enable it the libabigail package needs to be configured with
            the --enable-debug-self-comparison configure option.

          • <b>--debug-tc</b>

            In this mode, the process of type canonicalization is put
            under heavy scrutiny.  Basically, during type
            canonicalization, each type comparison is performed twice:
            once in a structural mode (comparing every sub-type
            member-wise), and once using canonical comparison.  The two
            comparisons should yield the same result.  Otherwise, an
            abort signal is emitted and the process can be debugged to
            understand why the two kinds of comparison yield different
            results.

            This is an optional debugging and sanity check option.  To
            enable it the libabigail package needs to be configured with
            the --enable-debug-type-canonicalization configure option.

          • <b>--deleted-fns</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the globally defined functions that got deleted from
            <i>first-shared-library</i>.

          • <b>--deleted-vars</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, only display
            the globally defined variables that were deleted from
            <i>first-shared-library</i>.

          • <b>--drop </b><<i>regex</i>>

            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, drop the globally
            defined functions and variables which name match the regular
            expression <i>regex</i>.  As a result, no change involving these
            functions or variables will be emitted in the diff report.

          • <b>--drop-fn </b><<i>regex</i>>

            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, drop the globally
            defined functions which name match the regular expression
            <i>regex</i>.  As a result, no change involving these functions will
            be emitted in the diff report.

          • <b>--drop-var </b><<i>regex</i>>

            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, drop the globally
            defined variables matching a the regular expression <i>regex</i>.

          • <b>--drop-private-types</b>

            This option is to be used with the <b>--headers-dir1</b>,
            <b>header-file1</b>, <b>header-file2 </b>and <b>--headers-dir2 </b>options.  With
            this option, types that are <i>NOT</i> defined in the headers are
            entirely dropped from the internal representation build by
            Libabigail to represent the ABI.  They thus don't have to be
            filtered out from the final ABI change report because they
            are not even present in Libabigail's representation.

            Without this option however, those private types are kept in
            the internal representation and later filtered out from the
            report.

            This options thus potentially makes Libabigail consume less
            memory.  It's meant to be mainly used to optimize the memory
            consumption of the tool on binaries with a lot of publicly
            defined and exported types.

          • <b>--dump-diff-tree</b>
              After the diff report, emit a textual representation of the
              diff nodes tree used by the comparison engine to represent
              the changed functions and variables.  That representation
              is emitted to the error output for debugging purposes.
              Note that this diff tree is relevant only to functions and
              variables that have some sub-type changes.  Added or
              removed functions and variables do not have any diff nodes
              tree associated to them.

          • <b>--exported-interfaces-only</b>

            By default, when looking at the debug information
            accompanying a binary, this tool analyzes the descriptions of
            the types reachable by the interfaces (functions and
            variables) that are visible outside of their translation
            unit.  Once that analysis is done, an ABI corpus is
            constructed by only considering the subset of types reachable
            from interfaces associated to �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ symbols that are defined
            and exported by the binary.  It's those final ABI Corpora
            that are compared by this tool.

            The problem with that approach however is that analyzing all
            the interfaces that are visible from outside their
            translation unit can amount to a lot of data, especially when
            those binaries are applications, as opposed to shared
            libraries.  One example of such applications is the �]8;;https://kernel.org/�\<i>Linux</i>
            <i>Kernel</i>�]8;;�\.  Analyzing massive ABI corpora like these can be
            extremely slow.

            To mitigate that performance issue, this option allows
            libabigail to only analyze types that are reachable from
            interfaces associated with defined and exported �]8;;http://en.wikipedia.org/wiki/Executable_and_Linkable_Format�\<i>ELF</i>�]8;;�\ symbols.

            Note that this option is turned on by default when analyzing
            the �]8;;https://kernel.org/�\<i>Linux Kernel</i>�]8;;�\.  Otherwise, it's turned off by default.

          • <b>--fail-no-debug-info</b>

            If no debug info was found, then this option makes the
            program to fail.  Otherwise, without this option, the program
            will attempt to compare properties of the binaries that are
            not related to debug info, like pure ELF properties.

          • <b>--follow-dependencies | --fdeps</b>

            For each dependency of the first argument of <b>abidiff</b>, if it's
            found in the directory specified by the <b>--added-binaries-dir1</b>
            option, then construct an ABI corpus out of the dependency,
            add it to a set of corpora (called an ABI Corpus Group) that
            includes the first argument of <b>abidiff</b>.

            Similarly, for each dependency of the second argument of
            <b>abidiff</b>, if it's found in the directory specified by the
            <b>--added-binaries-dir2 </b>option, then construct an ABI corpus
            out of the dependency, add it to an ABI corpus group that
            includes the second argument of <b>abidiff</b>.

            These two ABI corpus groups are then compared against each
            other.

            Said otherwise, this makes <b>abidiff </b>compare the set of its
            first input and its dependencies against the set of its
            second input and its dependencies.

          • <b>--harmless</b>

            In the diff report, display only the <i>harmless</i> changes.  By
            default, the harmless changes are filtered out of the diff
            report keep the clutter to a minimum and have a greater
            chance to spot real ABI issues.

          • <b>--headers-dir1 | --hd1 </b><headers-directory-path-1>

            Specifies where to find the public headers of the first
            shared library (or binary in general) that the tool has to
            consider.  The tool will thus filter out ABI changes on types
            that are not defined in public headers.

            Note that several public header directories can be specified
            for the first shared library.  In that case the
            <b>--headers-dir1 </b>option should be present several times on the
            command line, like in the following example:

                $ abidiff --headers-dir1 /some/path       \
                          --headers-dir1 /some/other/path \
                          binary-version-1 binary-version-2

          • <b>--headers-dir2 | --hd2 </b><headers-directory-path-2>

            Specifies where to find the public headers of the second
            shared library that the tool has to consider.  The tool will
            thus filter out ABI changes on types that are not defined in
            public headers.

            Note that several public header directories can be specified
            for the second shared library.  In that case the
            <b>--headers-dir2 </b>option should be present several times like in
            the following example:

                $ abidiff --headers-dir2 /some/path       \
                          --headers-dir2 /some/other/path \
                          binary-version-1 binary-version-2

          • <b>--header-file1 | --hf1 </b><header-file-path-1>

            Specifies where to find one public header of the first shared
            library that the tool has to consider.  The tool will thus
            filter out ABI changes on types that are not defined in
            public headers.

          • <b>--header-file2 | --hf2 </b><header-file-path-2>

            Specifies where to find one public header of the second
            shared library that the tool has to consider.  The tool will
            thus filter out ABI changes on types that are not defined in
            public headers.

          • <b>--help | -h</b>

            Display a short help about the command and exit.

          • <b>--ignore-soname</b>

            Ignore differences in the SONAME when doing a comparison

          • <b>--impacted-interfaces</b>

            When showing leaf changes, this option instructs abidiff to
            show the list of impacted interfaces.  This option is thus to
            be used in addition the <b>--leaf-changes-only </b>option,
            otherwise, it's ignored.

          • <b>--keep </b><<i>regex</i>>

            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, keep the globally
            defined functions and variables which names match the regular
            expression <i>regex</i>.  All other functions and variables are
            dropped on the floor and will thus not appear in the
            resulting diff report.

          • <b>--keep-fn </b><<i>regex</i>>

            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, keep the globally
            defined functions which name match the regular expression
            <i>regex</i>.  All other functions are dropped on the floor and will
            thus not appear in the resulting diff report.

          • <b>--keep-var </b><<i>regex</i>>

            When reading the <i>first-shared-library</i> and
            <i>second-shared-library</i> ELF input files, keep the globally
            defined which names match the regular expression <i>regex</i>.  All
            other variables are dropped on the floor and will thus not
            appear in the resulting diff report.

          • <b>--kmi-whitelist | -w </b><<i>path-to-whitelist</i>>

            When analyzing a Linux kernel binary, this option points to
            the white list of names of ELF symbols of functions and
            variables which ABI must be considered.  That white list is
            called a "Kernel Module Interface white list".  This is
            because for the Kernel, we don't talk about <b>ABI</b>; we rather
            talk about the interface between the Kernel and its module.
            Hence the term <b>KMI </b>rather than <b>ABI</b>.

            Any other function or variable which ELF symbol are not
            present in that white list will not be considered by this
            tool.

            If this option is not provided -- thus if no white list is
            provided -- then the entire KMI, that is, the set of all
            publicly defined and exported functions and global variables
            by the Linux Kernel binaries, is considered.

          • <b>--leaf-changes-only|-l </b>only show leaf changes, so don't show
            impact analysis report.  This option implies <b>--redundant</b>.

            The typical output of abidiff when comparing two binaries
            looks like this

                $ abidiff libtest-v0.so libtest-v1.so
                Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

                1 function with some indirect sub-type change:

                  [C]'function void fn(C&)' at test-v1.cc:13:1 has some indirect sub-type changes:
                    parameter 1 of type 'C&' has sub-type changes:
                      in referenced type 'struct C' at test-v1.cc:7:1:
                        type size hasn't changed
                        1 data member change:
                         type of 'leaf* C::m0' changed:
                           in pointed to type 'struct leaf' at test-v1.cc:1:1:
                             type size changed from 32 to 64 bits
                             1 data member insertion:
                               'char leaf::m1', at offset 32 (in bits) at test-v1.cc:4:1

                $

            So in that example the report emits information about how the
            data member insertion change of "struct leaf" is reachable
            from function "void fn(C&)".  In other words, the report not
            only shows the data member change on "struct leaf", but it
            also shows the impact of that change on the function "void
            fn(C&)".

            In abidiff parlance, the change on "struct leaf" is called a
            leaf change.  So the <b>--leaf-changes-only</b>
            <b>--impacted-interfaces </b>options show, well, only the leaf
            change.  And it goes like this:

                $ abidiff -l libtest-v0.so libtest-v1.so
                'struct leaf' changed:
                  type size changed from 32 to 64 bits
                  1 data member insertion:
                    'char leaf::m1', at offset 32 (in bits) at test-v1.cc:4:1

                  one impacted interface:
                    function void fn(C&)
                $

            Note how the report ends by showing the list of interfaces
            impacted by the leaf change.

            Now if you don't want to see that list of impacted
            interfaces, then you can just avoid using the
            <b>--impacted-interface </b>option.  You can learn about that option
            below, in any case.

          • <b>--list-dependencies | --ldeps</b>

            This option lists all the dependencies of the input arguments
            of <b>abidiff </b>that are found in the directories specified by the
            options <b>--added-binaries-dir1 </b>and <b>--added-binaries-dir2</b>

          • <b>--no-added-syms</b>

            In the resulting report about the differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, do not
            display added functions or variables.  Do not display added
            functions or variables ELF symbols either.  All other kinds
            of changes are displayed unless they are explicitely
            forbidden by other options on the command line.

          • <b>--no-assume-odr-for-cplusplus</b>

            When analyzing a binary originating from C++ code using �]8;;http://www.dwarfstd.org�\<i>DWARF</i>�]8;;�\
            debug information, libabigail assumes the �]8;;https://en.wikipedia.org/wiki/One_Definition_Rule�\<i>One Definition Rule</i>�]8;;�\
            to speed-up the analysis.  In that case, when several types
            have the same name in the binary, they are assumed to all be
            equal.

            This option disables that assumption and instructs libabigail
            to actually actually compare the types to determine if they
            are equal.

          • <b>--no-architecture</b>

            Do not take architecture in account when comparing ABIs.

          • <b>--no-change-categorization | -x</b>

            This option disables the categorization of changes into
            harmless and harmful changes.  Note that this categorization
            is a pre-requisite for the filtering of changes so this
            option disables that filtering.  The goal of this option is
            to speed-up the execution of the program for cases where the
            graph of changes is huge and where the user is just
            interested in looking at, for instance, leaf node changes
            without caring about their possible impact on interfaces.  In
            that case, this option would be used along with the
            <b>--leaf-changes-only </b>one.

          • <b>--no-corpus-path</b>

            Do not emit the path attribute for the ABI corpus.

          • <b>--no-default-suppression</b>

            Do not load the <i>default suppression specification files</i>.

          • <b>--no-harmful</b>

            In the diff report, do not display the <i>harmful</i> changes.  By
            default, only the harmful changes are displayed in diff
            report.

          • <b>--no-leverage-dwarf-factorization</b>

            When analyzing a binary which �]8;;http://www.dwarfstd.org�\<i>DWARF</i>�]8;;�\ debug information was
            processed with the �]8;;https://sourceware.org/dwz�\<i>DWZ</i>�]8;;�\ tool, the type information is supposed
            to be already factorized.  That context is used by libabigail
            to perform some speed optimizations.

            This option disables those optimizations.

          • <b>--no-linkage-name</b>

            In the resulting report, do not display the linkage names of
            the added, removed, or changed functions or variables.

          • <b>--no-linux-kernel-mode</b>

            Without this option, if abidiff detects that the binaries it
            is looking at are Linux Kernel binaries (either vmlinux or
            modules) then it only considers functions and variables which
            ELF symbols are listed in the __ksymtab and __ksymtab_gpl
            sections.

            With this option, abidiff considers the binary as a
            non-special ELF binary.  It thus considers functions and
            variables which are defined and exported in the ELF sense.

          • <b>--no-redundant</b>

            In the diff report, do <i>NOT</i> display redundant changes.  A
            redundant change is a change that has been displayed
            elsewhere in the report.  This option is switched on by
            default.

          • <b>--no-show-locs</b>
              Do not show information about where in the <i>second shared</i>
              <i>library</i> the respective type was changed.

          • <b>--no-show-relative-offset-changes</b>

            Without this option, when the offset of a data member
            changes, the change report not only mentions the older and
            newer offset, but it also mentions by how many bits the data
            member changes.  With this option, the latter is not shown.

          • <b>--no-unreferenced-symbols</b>

            In the resulting report, do not display change information
            about function and variable symbols that are not referenced
            by any debug information.  Note that for these symbols not
            referenced by any debug information, the change information
            displayed is either added or removed symbols.

          • <b>--non-reachable-types|-t</b>

            Analyze and emit change reports for all the types of the
            binary, including those that are not reachable from global
            functions and variables.

            This option might incur some serious performance degradation
            as the number of types analyzed can be huge.  However, if
            paired with the <b>--headers-dir{1,2} </b>and/or <b>header-file{1,2}</b>
            options, the additional non-reachable types analyzed are
            restricted to those defined in public headers files, thus
            hopefully making the performance hit acceptable.

            Also, using this option alongside suppression specifications
            (by also using the <b>--suppressions </b>option) might help keep the
            number of analyzed types (and the potential performance
            degradation) in control.

            Note that without this option, only types that are reachable
            from global functions and variables are analyzed, so the tool
            detects and reports changes on these reachable types only.

          • <b>--redundant</b>

            In the diff report, do display redundant changes.  A
            redundant change is a change that has been displayed
            elsewhere in the report.

          • <b>--show-bits</b>

            Show sizes and offsets in bits, not bytes.  This option is
            activated by default.

          • <b>--show-bytes</b>

            Show sizes and offsets in bytes, not bits.  By default, sizes
            and offsets are shown in bits.

          • <b>--show-dec</b>

            Show sizes and offsets in decimal base.  This option is
            activated by default.

          • <b>--show-hex</b>

            Show sizes and offsets in hexadecimal base.

          • <b>--stat</b>

            Rather than displaying the detailed ABI differences between
            <i>first-shared-library</i> and <i>second-shared-library</i>, just display
            some summary statistics about these differences.

          • <b>--stats</b>

            Emit statistics about various internal things.

          • <b>--suppressions | --suppr </b><<i>path-to-suppressions</i>>

            Use a <i>suppression specification</i> file located at
            <i>path-to-suppressions</i>.  Note that this option can appear
            multiple times on the command line.  In that case, all of the
            provided suppression specification files are taken into
            account.

            Please note that, by default, if this option is not provided,
            then the <i>default suppression specification files</i> are loaded .

          • <b>--symtabs</b>

            Only display the symbol tables of the <i>first-shared-library</i>
            and <i>second-shared-library</i>.

          • <b>--verbose</b>

            Emit verbose logs about the progress of miscellaneous
            internal things.

          • <b>--version | -v</b>

            Display the version of the program and exit.

<a id="RETURN_VALUES" href="#RETURN_VALUES"></a>RETURN VALUES         <a href="#top_of_page">top</a>

       The exit code of the <b>abidiff </b>command is either 0 if the ABI of the
       binaries being compared are equal, or non-zero if they differ or
       if the tool encountered an error.

       In the later case, the exit code is a 8-bits-wide bit field in
       which each bit has a specific meaning.

       The first bit, of value 1, named <b>ABIDIFF_ERROR </b>means there was an
       error.

       The second bit, of value 2, named <b>ABIDIFF_USAGE_ERROR </b>means there
       was an error in the way the user invoked the tool.  It might be
       set, for instance, if the user invoked the tool with an unknown
       command line switch, with a wrong number or argument, etc.  If
       this bit is set, then the <b>ABIDIFF_ERROR </b>bit must be set as well.

       The third bit, of value 4, named <b>ABIDIFF_ABI_CHANGE </b>means the ABI
       of the binaries being compared are different.

       The fourth bit, of value 8, named <b>ABIDIFF_ABI_INCOMPATIBLE_CHANGE</b>
       means the ABI of the binaries compared are different in an
       incompatible way.  If this bit is set, then the <b>ABIDIFF_ABI_CHANGE</b>
       bit must be set as well.  If the <b>ABIDIFF_ABI_CHANGE </b>is set and the
       <b>ABIDIFF_INCOMPATIBLE_CHANGE </b>is <i>NOT</i> set, then it means that the
       ABIs being compared might or might not be compatible.  In that
       case, a human being needs to review the ABI changes to decide if
       they are compatible or not.

       Note that, at the moment, there are only a few kinds of ABI
       changes that would result in setting the flag
       <b>ABIDIFF_ABI_INCOMPATIBLE_CHANGE</b>.  Those ABI changes are either:

          • the removal of the symbol of a function or variable that has
            been defined and exported.

          • the modification of the index of a member of a virtual
            function table (for C++ programs and libraries).

       With time, when more ABI change patterns are found to <i>always</i>
       constitute incompatible ABI changes, we will adapt the code to
       recognize those cases and set the <b>ABIDIFF_ABI_INCOMPATIBLE_CHANGE</b>
       accordingly.  So, if you find such patterns, please let us know.

       The remaining bits are not used for the moment.

<a id="USAGE_EXAMPLES" href="#USAGE_EXAMPLES"></a>USAGE EXAMPLES         <a href="#top_of_page">top</a>

          1. Detecting an ABI change in a sub-type of a function:

                 $ cat -n test-v0.cc
                          1      // Compile this with:
                          2      //   g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                          3
                          4      struct S0
                          5      {
                          6        int m0;
                          7      };
                          8
                          9      void
                         10      foo(S0* /*parameter_name*/)
                         11      {
                         12        // do something with parameter_name.
                         13      }
                 $
                 $ cat -n test-v1.cc
                          1      // Compile this with:
                          2      //   g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                          3
                          4      struct type_base
                          5      {
                          6        int inserted;
                          7      };
                          8
                          9      struct S0 : public type_base
                         10      {
                         11        int m0;
                         12      };
                         13
                         14      void
                         15      foo(S0* /*parameter_name*/)
                         16      {
                         17        // do something with parameter_name.
                         18      }
                 $
                 $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                 $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                 $
                 $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                 Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

                 1 function with some indirect sub-type change:

                   [C]'function void foo(S0*)' has some indirect sub-type changes:
                         parameter 0 of type 'S0*' has sub-type changes:
                           in pointed to type 'struct S0':
                             size changed from 32 to 64 bits
                             1 base class insertion:
                               struct type_base
                             1 data member change:
                              'int S0::m0' offset changed from 0 to 32
                 exit code: 4
                 $

       Note how the exit code is 4, meaning the third bit
       ABIDIFF_ABI_CHANGE of value 4 is set to 1.  This means the tool
       categorizes the ABI change as <i>harmful</i> and thus requires a user
       review.

          2. Detecting an incompatible ABI change in the type of a
             function:

                 $ cat -n test-v0.cc
                      1  // Compile this with:
                      2  //   g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                      3
                      4  struct S0
                      5  {
                      6    int m0;
                      7  };
                      8
                      9  S0
                     10  foo()
                     11  {
                     12    S0 s = {};
                     13    return s;
                     14  }
                 $
                 $ cat -n test-v1.cc
                      1  // Compile this with:
                      2  //   g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                      3
                      4  struct type_base
                      5  {
                      6    int inserted;
                      7  };
                      8
                      9  struct S0 : public type_base
                     10  {
                     11    int m0;
                     12  };
                     13
                     14  S0
                     15  foo()
                     16  {
                     17    S0 s = {};
                     18    return s;
                     19  }
                 $
                 $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                 $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                 $
                 $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                 Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

                 1 function with incompatible sub-type changes:

                   [C] 'function S0 foo(void)' at test-v0.cc:10:1 has some sub-type changes:
                     return type changed:
                       type size changed from 32 to 64 (in bits)
                       1 base class insertion:
                         struct type_base at test-v1.cc:4:1
                       1 data member change:
                         'int m0' offset changed from 0 to 32 (in bits) (by +32 bits)

                 exit code: 12
                 $

       Note how the exit code is 12, meaning both the third bit
       ABIDIFF_ABI_CHANGE of value 4 and the fourth bit
       ABIDIFF_ABI_INCOMPATIBLE_CHANGE of value 8 are set to 1.  This
       means the tool categorizes the ABI change as <i>incompatible</i>.  It's
       an ABI break.

          3. Detecting another change in a sub-type of a function:

                 $ cat -n test-v0.cc
                          1      // Compile this with:
                          2      //   g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                          3
                          4      struct S0
                          5      {
                          6        int m0;
                          7      };
                          8
                          9      void
                         10      foo(S0& /*parameter_name*/)
                         11      {
                         12        // do something with parameter_name.
                         13      }
                 $
                 $ cat -n test-v1.cc
                          1      // Compile this with:
                          2      //   g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                          3
                          4      struct S0
                          5      {
                          6        char inserted_member;
                          7        int m0;
                          8      };
                          9
                         10      void
                         11      foo(S0& /*parameter_name*/)
                         12      {
                         13        // do something with parameter_name.
                         14      }
                 $
                 $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                 $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                 $
                 $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                 Functions changes summary: 0 Removed, 1 Changed, 0 Added function
                 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

                 1 function with some indirect sub-type change:

                   [C]'function void foo(S0&)' has some indirect sub-type changes:
                         parameter 0 of type 'S0&' has sub-type changes:
                           in referenced type 'struct S0':
                             size changed from 32 to 64 bits
                             1 data member insertion:
                               'char S0::inserted_member', at offset 0 (in bits)
                             1 data member change:
                              'int S0::m0' offset changed from 0 to 32

                 exit code: 4
                 $

          4. Detecting that functions got removed or added to a library:

                 $ cat -n test-v0.cc
                          1      // Compile this with:
                          2      //   g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                          3
                          4      struct S0
                          5      {
                          6        int m0;
                          7      };
                          8
                          9      void
                         10      foo(S0& /*parameter_name*/)
                         11      {
                         12        // do something with parameter_name.
                         13      }
                 $
                 $ cat -n test-v1.cc
                          1      // Compile this with:
                          2      //   g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                          3
                          4      struct S0
                          5      {
                          6        char inserted_member;
                          7        int m0;
                          8      };
                          9
                         10      void
                         11      bar(S0& /*parameter_name*/)
                         12      {
                         13        // do something with parameter_name.
                         14      }
                 $
                 $ g++ -g -Wall -shared -o libtest-v0.so test-v0.cc
                 $ g++ -g -Wall -shared -o libtest-v1.so test-v1.cc
                 $
                 $ abidiff libtest-v0.so libtest-v1.so; echo "exit code: $?"
                 Functions changes summary: 1 Removed, 0 Changed, 1 Added functions
                 Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

                 1 Removed function:
                   'function void foo(S0&)'    {_Z3fooR2S0}

                 1 Added function:
                   'function void bar(S0&)'    {_Z3barR2S0}

                 exit code: 12
                 $

          5. Comparing two sets of binaries that are passed on the
             command line:

                 $ abidiff --add-binaries1=file2-v1              \
                           --add-binaries2=file2-v2,file2-v1     \
                           --added-binaries-dir1 dir1            \
                           --added-binaries-dir2 dir2            \
                           file1-v1 file1-v2

             Note that the files <b>file2-v1</b>, and <b>file2-v2 </b>are to be found
             in <b>dir1 </b>and <b>dir2 </b>or in the current directory.

          6. Compare two libraries and their dependencies:

                 $ abidiff --follow-dependencies                      \
                           --added-binaries-dir1 /some/where          \
                           --added-binaries-dir2 /some/where/else     \
                           foo bar

             This compares the set of binaries comprised by <b>foo </b>and its
             dependencies against the set of binaries comprised by <b>bar</b>
             and its dependencies.

<a id="AUTHOR" href="#AUTHOR"></a>AUTHOR         <a href="#top_of_page">top</a>

       Dodji Seketeli

<a id="COPYRIGHT" href="#COPYRIGHT"></a>COPYRIGHT         <a href="#top_of_page">top</a>

       2014-2025, Red Hat, Inc.

<a id="COLOPHON" href="#COLOPHON"></a>COLOPHON         <a href="#top_of_page">top</a>

       This page is part of the <i>libabigail</i> (ABI Generic Analysis and
       Instrumentation Library) project.  Information about the project
       can be found at ⟨<a href="https://sourceware.org/libabigail/">https://sourceware.org/libabigail/</a>⟩.  If you have
       a bug report for this manual page, see
       ⟨<a href="http://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail">http://sourceware.org/bugzilla/enter_bug.cgi?product=libabigail</a>⟩.
       This page was obtained from the project's upstream Git repository
       ⟨git://sourceware.org/git/libabigail.git⟩ on 2025-08-11.  (At that
       time, the date of the most recent commit that was found in the
       repository was 2025-07-28.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is <i>not</i> part of the original manual page), send a mail to
       man-pages@man7.org

<span class="footline">                               Aug 11, 2025                    <i>ABIDIFF</i>(1)</span>