libelf.xml 4.2 KB

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