libelf.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 --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. <!-- - - - - - - - - - -->
  48. <!-- Multilib - 32bit -->
  49. <!-- - - - - - - - - - -->
  50. <sect2 arch="ml_32,ml_all" role="installation">
  51. <title>Installation of Libelf - 32bit</title>
  52. <para>Clean previous build:</para>
  53. <screen><userinput remap="pre">make distclean</userinput></screen>
  54. <para>Prepare Libtool for compilation:</para>
  55. <screen><userinput remap="configure">CC="gcc -m32" ./configure \
  56. --prefix=/usr \
  57. --libdir=&usr-lib-m32; \
  58. --host=i686-pc-linux-gnu \
  59. --disable-debuginfod</userinput></screen>
  60. <para>Compile the package:</para>
  61. <screen><userinput remap="make">make</userinput></screen>
  62. <para>Install the package:</para>
  63. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
  64. install -vDm644 config/libelf.pc DESTDIR&usr-lib-m32;/pkgconfig/libelf.pc
  65. cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
  66. rm -rf DESTDIR</userinput></screen>
  67. </sect2><!-- m32 -->
  68. <!-- - - - - - - - - - -->
  69. <!-- Multilib - x32bit -->
  70. <!-- - - - - - - - - - -->
  71. <sect2 arch="ml_x32,ml_all" role="installation">
  72. <title>Installation of Libelf - x32bit</title>
  73. <para>Clean previous build:</para>
  74. <screen><userinput remap="pre">make distclean</userinput></screen>
  75. <para>Prepare Libtool for compilation:</para>
  76. <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
  77. --prefix=/usr \
  78. --libdir=&usr-lib-m32; \
  79. --host=x86_64-pc-linux-gnux32 \
  80. --disable-debuginfod</userinput></screen>
  81. <para>Compile the package:</para>
  82. <screen><userinput remap="make">make</userinput></screen>
  83. <para>Install the package:</para>
  84. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
  85. install -vDm644 config/libelf.pc DESTDIR&usr-lib-mx32;/pkgconfig/libelf.pc
  86. cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
  87. rm -rf DESTDIR</userinput></screen>
  88. </sect2><!-- mx32 -->
  89. <sect2 id="contents-elfutils" role="content">
  90. <title>Contents of Libelf</title>
  91. <segmentedlist>
  92. <segtitle>Installed Library</segtitle>
  93. <segtitle>Installed Directory</segtitle>
  94. <seglistitem>
  95. <seg>
  96. libelf.so
  97. </seg>
  98. <seg>
  99. /usr/include/elfutils
  100. </seg>
  101. </seglistitem>
  102. </segmentedlist>
  103. </sect2>
  104. </sect1>