libelf.xml 3.7 KB

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