libelf.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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-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.bz2 as the source tarball.</para>
  35. <para>Prepare Libelf for compilation:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr --disable-debuginfod</userinput></screen>
  37. <para>Compile the package:</para>
  38. <screen><userinput remap="make">make</userinput></screen>
  39. <para>To test the results, issue:</para>
  40. <screen><userinput remap="test">make check</userinput></screen>
  41. <para>One test, run-elfclassify.sh, is known to fail.</para>
  42. <para>Install only Libelf:</para>
  43. <screen><userinput remap="install">make -C libelf install
  44. install -vm644 config/libelf.pc /usr/lib/pkgconfig
  45. rm /usr/lib/libelf.a</userinput></screen>
  46. </sect2>
  47. <sect2 arch="ml_32,ml_all" role="installation">
  48. <title>Installation of Libelf - 32-bit</title>
  49. <para>Clean previous build:</para>
  50. <screen><userinput remap="pre">make distclean</userinput></screen>
  51. <para>Prepare Libelf for compilation:</para>
  52. <screen><userinput remap="configure">CC="gcc -m32" ./configure \
  53. --prefix=/usr \
  54. --libdir=/usr/lib32 \
  55. --host=i686-pc-linux-gnu \
  56. --disable-debuginfod</userinput></screen>
  57. <para>Compile the package:</para>
  58. <screen><userinput remap="make">make</userinput></screen>
  59. <para>Install the package:</para>
  60. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
  61. install -vDm644 config/libelf.pc DESTDIR/usr/lib32/pkgconfig/libelf.pc
  62. cp -Rv DESTDIR/usr/lib32/* /usr/lib32
  63. rm -rf DESTDIR</userinput></screen>
  64. </sect2>
  65. <sect2 arch="ml_x32,ml_all" role="installation">
  66. <title>Installation of Libelf - x32-bit</title>
  67. <para>Clean previous build:</para>
  68. <screen><userinput remap="pre">make distclean</userinput></screen>
  69. <para>Prepare Libelf for compilation:</para>
  70. <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
  71. --prefix=/usr \
  72. --libdir=/usr/libx32 \
  73. --host=x86_64-pc-linux-gnux32 \
  74. --disable-debuginfod</userinput></screen>
  75. <para>Compile the package:</para>
  76. <screen><userinput remap="make">make</userinput></screen>
  77. <para>Install the package:</para>
  78. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
  79. install -vDm644 config/libelf.pc DESTDIR/usr/libx32/pkgconfig/libelf.pc
  80. cp -Rv DESTDIR/usr/libx32/* /usr/libx32
  81. rm -rf DESTDIR</userinput></screen>
  82. </sect2>
  83. <sect2 id="contents-elfutils" role="content">
  84. <title>Contents of Libelf</title>
  85. <segmentedlist>
  86. <segtitle>Installed Library</segtitle>
  87. <segtitle>Installed Directory</segtitle>
  88. <seglistitem>
  89. <seg>
  90. libelf.so
  91. </seg>
  92. <seg>
  93. /usr/include/elfutils
  94. </seg>
  95. </seglistitem>
  96. </segmentedlist>
  97. </sect2>
  98. </sect1>