http://wiki.rosalab.com/en/index.php?title=%D0%91%D0%BB%D0%BE%D0%B3:ROSA_Planet/ABI_Dumper_-_A_tool_to_dump_ABI_from_DWARF_debug-info_of_an_ELF-object&feed=atom&action=historyБлог:ROSA Planet/ABI Dumper - A tool to dump ABI from DWARF debug-info of an ELF-object - Revision history2024-03-29T11:39:17ZRevision history for this page on the wikiMediaWiki 1.26.4http://wiki.rosalab.com/en/index.php?title=%D0%91%D0%BB%D0%BE%D0%B3:ROSA_Planet/ABI_Dumper_-_A_tool_to_dump_ABI_from_DWARF_debug-info_of_an_ELF-object&diff=8881&oldid=prevAponomarenko at 21:01, 30 January 20162016-01-30T21:01:52Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 21:01, 30 January 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3" >Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>An important part of any ELF-object is its binary interface (ABI), provided for its client applications to use. In essence, it is a representation of the object's API on the binary level (after compilation). When you update the object in the distribution, it is important to maintain ABI backwards-compatible, otherwise it may cause a malfunction or crash of applications. Changes in the ABI are usually caused by corresponding changes in the API of an object or by changes in the configuration and compilation options. To track changes in the ABI of an object we use the [https://github.com/lvc/abi-compliance-checker ABI Compliance Checker] tool. But until now it could only analyze shared libraries by extracting information from header files.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>An important part of any ELF-object is its binary interface (ABI), provided for its client applications to use. In essence, it is a representation of the object's API on the binary level (after compilation). When you update the object in the distribution, it is important to maintain ABI backwards-compatible, otherwise it may cause a malfunction or crash of applications. Changes in the ABI are usually caused by corresponding changes in the API of an object or by changes in the configuration and compilation options. To track changes in the ABI of an object we use the [https://github.com/lvc/abi-compliance-checker ABI Compliance Checker] tool. But until now it could only analyze shared libraries by extracting information from header files.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>In order to expand and simplify usage of the ABI Compliance Checker tool, we <del class="diffchange diffchange-inline">have created the </del>[https://github.com/lvc/abi-dumper ABI Dumper] tool for extracting ABI information from the debug-info of an object. Now, with the help of this tool one can track changes not only in the ABI of libraries, but also, for example, in the ABI of kernel modules. A typical use case is to create ABI dumps for the old and the new version of an object:</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>In order to expand and simplify usage of the ABI Compliance Checker tool, we <ins class="diffchange diffchange-inline">use </ins>[https://github.com/lvc/abi-dumper ABI Dumper] tool for extracting ABI information from the debug-info of an object. Now, with the help of this tool one can track changes not only in the ABI of libraries, but also, for example, in the ABI of kernel modules. A typical use case is to create ABI dumps for the old and the new version of an object:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>abi-dumper libtest.so.0 -o ABIv0.dump</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>abi-dumper libtest.so.0 -o ABIv0.dump</div></td></tr>
</table>Aponomarenkohttp://wiki.rosalab.com/en/index.php?title=%D0%91%D0%BB%D0%BE%D0%B3:ROSA_Planet/ABI_Dumper_-_A_tool_to_dump_ABI_from_DWARF_debug-info_of_an_ELF-object&diff=7645&oldid=prevStanislav.fomin at 11:30, 6 August 20132013-08-06T11:30:39Z<p></p>
<p><b>New page</b></p><div>When you compile ELF-object, such as shared library or kernel module, with the additional ''-g'' option, the debug information is inserted in this object. This information is typically used by the standard debugger ''gdb'' to provide the user with additional features when debugging the program. One can read this debug-info with the help of ''-debug-dump'' option of the ''readelf'' or ''eu-readelf'' utility (from ''elfutils'' package).<br />
<br />
An important part of any ELF-object is its binary interface (ABI), provided for its client applications to use. In essence, it is a representation of the object's API on the binary level (after compilation). When you update the object in the distribution, it is important to maintain ABI backwards-compatible, otherwise it may cause a malfunction or crash of applications. Changes in the ABI are usually caused by corresponding changes in the API of an object or by changes in the configuration and compilation options. To track changes in the ABI of an object we use the [https://github.com/lvc/abi-compliance-checker ABI Compliance Checker] tool. But until now it could only analyze shared libraries by extracting information from header files.<br />
<br />
In order to expand and simplify usage of the ABI Compliance Checker tool, we have created the [https://github.com/lvc/abi-dumper ABI Dumper] tool for extracting ABI information from the debug-info of an object. Now, with the help of this tool one can track changes not only in the ABI of libraries, but also, for example, in the ABI of kernel modules. A typical use case is to create ABI dumps for the old and the new version of an object:<br />
<pre><br />
abi-dumper libtest.so.0 -o ABIv0.dump<br />
abi-dumper libtest.so.1 -o ABIv1.dump<br />
</pre><br />
<br />
and then compare them:<br />
<pre><br />
abi-compliance-checker -l libtest -old ABIv0.dump -new ABIv1.dump<br />
</pre><br />
<br />
Unfortunately, this approach has its drawbacks. Perhaps the main drawback is the inability to perform some compatibility checks. For example, there is no possibility to check for changes in the values of the constants (defines as well as const global data), since their values are inlined at compile time, and not presented in the debug information of the binary ELF-object. In general, there can be checked about 98% of all compatibility rules. Another disadvantage is the long time required to analyze large objects bigger than 50 mb. But one can use the [http://fedoraproject.org/wiki/Features/DwarfCompressor dwz] utility to compress input debug-info.<br />
{{wl-publish: 2013-05-31 13:06:48 +0400 | Andrey.ponomarenko }}<br />
<br />
[[Category:ToROSAPlanet]]</div>Stanislav.fomin