<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-libelf" role="wrap">
  <?dbhtml filename="libelf.html"?>

  <sect1info condition="script">
    <productname>libelf</productname>
    <productnumber>&elfutils-version;</productnumber>
    <address>&elfutils-url;</address>
  </sect1info>

  <title>Libelf &elfutils-version;</title>

  <indexterm zone="ch-system-libelf">
    <primary sortas="a-Libelf">Libelf</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>Libelf 是一个处理 ELF （可执行和可链接格式）文件的库。</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&elfutils-ch6-sbu;</seg>
        <seg>&elfutils-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>安装 Libelf</title>

      <para>Libelf 是 elfutils-&elfutils-version; 软件包的一部分，
      使用 elfutils-&elfutils-version;.tar.xz 作为源代码包。</para>

    <para>准备编译 Libelf：</para>

<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>

    <para>编译该软件包：</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>执行下列命令以测试编译结果：</para>
    
<screen><userinput remap="test">make check</userinput></screen>

    <para>只安装 Libelf：</para>

<screen><userinput remap="install">make -C libelf install
install -vm644 config/libelf.pc /usr/lib/pkgconfig</userinput></screen>

  </sect2>

  <sect2 id="contents-elfutils" role="content">
    <title>Libelf 的内容</title>

    <segmentedlist>
      <segtitle>安装的库</segtitle>

      <seglistitem>
        <seg>
          libelf.so
        </seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

</sect1>
