<?xml version="1.0" encoding="ISO-8859-1"?>
<!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;

  <!ENTITY elfutils-download-http
          "https://fedorahosted.org/releases/e/l/elfutils/&elfutils-version;/elfutils-&elfutils-version;.tar.bz2">
  <!ENTITY elfutils-download-ftp  " ">
  <!ENTITY elfutils-md5sum        "e1b9847c9a6a1ad340de8d47a863ec52">
  <!ENTITY elfutils-size          "5.3 MB">
  <!ENTITY elfutils-buildsize     "94 MB (additional 3 MB for the tests)">
  <!ENTITY elfutils-time          "0.8 SBU (additional 0.2 SBU for the tests)">
]>

<sect1 id="elfutils" xreflabel="elfutils-&elfutils-version;">
  <?dbhtml filename="elfutils.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-03-03 22:27:20 -0500 (Tue, 03 Mar 2015) $</date>
  </sect1info>

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

  <indexterm zone="elfutils">
    <primary sortas="a-elfutils">elfutils</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to elfutils</title>

    <para>
      The <application>elfutils</application> package contains set of utilities
      and libraries for handling ELF (Executable and Linkable Format) files.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&elfutils-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&elfutils-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &elfutils-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &elfutils-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &elfutils-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &elfutils-time;
        </para>
      </listitem>
    </itemizedlist>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/elfutils"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of elfutils</title>

    <para>
      Install <application>elfutils</application> by running the following
      commands:
    </para>

<!-- don't disable static libs, disable-static switch doesn't work anyways -->
<screen><userinput>sed -e '/*runp =/,+2d'                           \
    -e '/runp +=/s/r.*;/*runp++ = '\0';/'        \
    -i libelf/elf_begin.c                        &amp;&amp;

./configure --prefix=/usr --program-prefix="eu-" &amp;&amp;
make</userinput></screen>

    <para>
      If you wish to run the test suite, first fix it to skip two failing tests:
    </para>

<screen><userinput>sed -i '/srcdir/ iexit 77\n'         \
       tests/run-backtrace-native.sh \
       tests/run-backtrace-native-core.sh</userinput></screen>

    <para>
       To test the results, issue: <command>make check</command>.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <command>sed ... libelf/elf_begin.c</command>: This command fixes a
      potiential vulnerability identified upstream.
    </para>

    <para>
      <parameter>--program-prefix="eu-"</parameter>: This switch renames installed
      programs to avoid conflict with <application>Binutils</application> programs
      installed in LFS.
    </para>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          eu-addr2line, eu-ar, eu-elfcmp, eu-elflint, eu-findtextrel, eu-ld,
          eu-make-debug-archive, eu-nm, eu-objdump, eu-ranlib, eu-readelf,
          eu-size, eu-stack, eu-strings, eu-strip, and eu-unstrip
        </seg>
        <seg>
          libasm.{a,so}, libdw.{a,so}, libebl.a, libelf.{a,so}, and
          some for different architectures under /usr/lib/elfutils
        </seg>
        <seg>
          /usr/include/elfutils and
          /usr/lib/elfutils
        </seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

</sect1>
