libelf.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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 from Elfutils-&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-fin-sbu;</seg>
  27. <seg>&elfutils-fin-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.bz2 as the source tarball.</para>
  35. <para>Prepare Libelf for compilation:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr \
  37. --disable-debuginfod \
  38. --enable-libdebuginfod=dummy \
  39. --libdir=/lib</userinput></screen>
  40. <para>Compile the package:</para>
  41. <screen><userinput remap="make">make</userinput></screen>
  42. <para>To test the results, issue:</para>
  43. <screen><userinput remap="test">make check</userinput></screen>
  44. <!-- <para>One test, run-elfclassify.sh, is known to fail.</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
  48. rm /lib/libelf.a</userinput></screen>
  49. </sect2>
  50. <!-- - - - - - - - - - -->
  51. <!-- Multilib - 32bit -->
  52. <!-- - - - - - - - - - -->
  53. <sect2 arch="ml_32,ml_all" role="installation">
  54. <title>Installation of Libelf - 32bit</title>
  55. <para>Clean previous build:</para>
  56. <screen><userinput remap="pre">make distclean</userinput></screen>
  57. <para>Prepare Libtool for compilation:</para>
  58. <screen><userinput remap="configure">CC="gcc -m32" ./configure \
  59. --prefix=/usr \
  60. --libdir=&usr-lib-m32; \
  61. --host=i686-pc-linux-gnu \
  62. --disable-debuginfod \
  63. --enable-libdebuginfod=dummy</userinput></screen>
  64. <para>Compile the package:</para>
  65. <screen><userinput remap="make">make</userinput></screen>
  66. <para>Install the package:</para>
  67. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
  68. install -vDm644 config/libelf.pc DESTDIR&usr-lib-m32;/pkgconfig/libelf.pc
  69. cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
  70. rm -rf DESTDIR</userinput></screen>
  71. </sect2><!-- m32 -->
  72. <!-- - - - - - - - - - -->
  73. <!-- Multilib - x32bit -->
  74. <!-- - - - - - - - - - -->
  75. <sect2 arch="ml_x32,ml_all" role="installation">
  76. <title>Installation of Libelf - x32bit</title>
  77. <para>Clean previous build:</para>
  78. <screen><userinput remap="pre">make distclean</userinput></screen>
  79. <para>Prepare Libtool for compilation:</para>
  80. <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
  81. --prefix=/usr \
  82. --libdir=&usr-lib-m32; \
  83. --host=x86_64-pc-linux-gnux32 \
  84. --disable-debuginfod \
  85. --enable-libdebuginfod=dummy</userinput></screen>
  86. <para>Compile the package:</para>
  87. <screen><userinput remap="make">make</userinput></screen>
  88. <para>Install the package:</para>
  89. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
  90. install -vDm644 config/libelf.pc DESTDIR&usr-lib-mx32;/pkgconfig/libelf.pc
  91. cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
  92. rm -rf DESTDIR</userinput></screen>
  93. </sect2><!-- mx32 -->
  94. <sect2 id="contents-elfutils" role="content">
  95. <title>Contents of Libelf</title>
  96. <segmentedlist>
  97. <segtitle>Installed Library</segtitle>
  98. <segtitle>Installed Directory</segtitle>
  99. <seglistitem>
  100. <seg>
  101. libelf.so (symlink) and libelf-&elfutils-version;.so
  102. </seg>
  103. <seg>
  104. /usr/include/elfutils
  105. </seg>
  106. </seglistitem>
  107. </segmentedlist>
  108. <variablelist>
  109. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  110. <?dbfo list-presentation="list"?>
  111. <?dbhtml list-presentation="table"?>
  112. <varlistentry id="libelf">
  113. <term><filename class="libraryfile">libelf</filename></term>
  114. <listitem>
  115. <para>Contains API functions to handle ELF object files</para>
  116. <indexterm zone="ch-system-libelf libelf">
  117. <primary sortas="c-libelf">libelf</primary>
  118. </indexterm>
  119. </listitem>
  120. </varlistentry>
  121. </variablelist>
  122. </sect2>
  123. </sect1>