libelf.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-libelf" role="wrap">
  8. <?dbhtml filename="libelf.html"?>
  9. <sect1info condition="script">
  10. <productname>libelf</productname>
  11. <productnumber>&elfutils-version;</productnumber>
  12. <address>&elfutils-url;</address>
  13. </sect1info>
  14. <title>Libelf &elfutils-version;</title>
  15. <indexterm zone="ch-system-libelf">
  16. <primary sortas="a-Libelf">Libelf</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Libelf is a library for handling ELF (Executable and Linkable Format)
  21. files.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&elfutils-ch6-sbu;</seg>
  27. <seg>&elfutils-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Libelf</title>
  33. <para>Libelf is part of elfutils-&elfutils-version; package. Use
  34. the elfutils-&elfutils-version;.tar.xz as the source tarball.</para>
  35. <para>First, fix a file to be compatible with gcc-8"</para>
  36. <screen><userinput remap="pre">sed -e '/ALIGN_PRSTATUS)/{
  37. s/__attribute/attribute_packed &amp;/
  38. s/packed, //}' \
  39. -i backends/linux-core-note.c</userinput></screen>
  40. <para>Prepare Libelf for compilation:</para>
  41. <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
  42. <para>Compile the package:</para>
  43. <screen><userinput remap="make">make</userinput></screen>
  44. <para>To test the results, issue <command>make check</command>.</para>
  45. <para>Install only Libelf:</para>
  46. <screen><userinput remap="install">make -C libelf install
  47. install -vm644 config/libelf.pc /usr/lib/pkgconfig</userinput></screen>
  48. </sect2>
  49. <sect2 id="contents-elfutils" role="content">
  50. <title>Contents of Libelf</title>
  51. <segmentedlist>
  52. <segtitle>Installed Library</segtitle>
  53. <seglistitem>
  54. <seg>
  55. libelf.so
  56. </seg>
  57. </seglistitem>
  58. </segmentedlist>
  59. </sect2>
  60. </sect1>