lfs-ru/chapter08/libelf.xml

173 lines
5.4 KiB
XML
Raw Normal View History

<?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>
2023-09-02 00:00:11 +03:00
<title>Libelf из Elfutils-&elfutils-version;</title>
<indexterm zone="ch-system-libelf">
<primary sortas="a-Libelf">Libelf</primary>
</indexterm>
<sect2 role="package">
<title/>
<para>Libelf — это библиотека для обработки файлов ELF (Executable and
Linkable Format - формат исполняемых и связываемых файлов).</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&elfutils-fin-sbu;</seg>
<seg>&elfutils-fin-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Установка пакета Libelf</title>
<para>Libelf является частью пакета elfutils-&elfutils-version;. Используйте
elfutils-&elfutils-version;.tar.bz2 в качестве исходного архива.</para>
<para>Подготовьте Libelf к компиляции:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
--disable-debuginfod \
--enable-libdebuginfod=dummy</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
rm /usr/lib/libelf.a</userinput></screen>
</sect2>
<!-- - - - - - - - - - -->
<!-- Multilib - 32bit -->
<!-- - - - - - - - - - -->
<sect2 arch="ml_32,ml_all" role="installation">
<title>Установка Libelf - 32-битная версия</title>
<para>Выполните очистку после предыдущей сборки:</para>
<screen><userinput remap="pre">make distclean</userinput></screen>
<para>Подготовьте Libelf к компиляции:</para>
<screen><userinput remap="configure">CC="gcc -m32" ./configure \
--host=i686-pc-linux-gnu \
--prefix=/usr \
--libdir=/usr/lib32 \
--disable-debuginfod \
--enable-libdebuginfod=dummy</userinput></screen>
<para>Скомпилируйте пакет:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>Установите пакет:</para>
<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
install -vDm644 config/libelf.pc DESTDIR/usr/lib32/pkgconfig/libelf.pc
cp -Rv DESTDIR/usr/lib32/* /usr/lib32
rm -rf DESTDIR</userinput></screen>
</sect2><!-- m32 -->
<!-- - - - - - - - - - -->
<!-- Multilib - x32bit -->
<!-- - - - - - - - - - -->
<sect2 arch="ml_x32,ml_all" role="installation">
<title>Установка Libelf - mx32</title>
<para>Выполните очистку после предыдущей сборки:</para>
<screen><userinput remap="pre">make distclean</userinput></screen>
<para>Подготовьте Libelf к компиляции:</para>
<screen><userinput remap="configure">CC="gcc -mx32" ./configure \
--host=x86_64-pc-linux-gnux32 \
--prefix=/usr \
--libdir=/usr/libx32 \
--disable-debuginfod \
--enable-libdebuginfod=dummy</userinput></screen>
<para>Скомпилируйте пакет:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>Установите пакет:</para>
<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR -C libelf install
install -vDm644 config/libelf.pc DESTDIR/usr/libx32/pkgconfig/libelf.pc
cp -Rv DESTDIR/usr/libx32/* /usr/libx32
rm -rf DESTDIR</userinput></screen>
</sect2><!-- mx32 -->
<sect2 id="contents-elfutils" role="content">
<title>Содержимое пакета Libelf</title>
<segmentedlist>
2023-08-03 23:54:52 +03:00
<segtitle>Установленные библиотеки</segtitle>
2023-05-24 09:00:49 +03:00
<segtitle>Созданные каталоги</segtitle>
<seglistitem>
<seg>
libelf.so
</seg>
<seg>
/usr/include/elfutils
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Краткое описание</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="libelf">
<term><filename class="libraryfile">libelf.so</filename></term>
<listitem>
<para>Содержит функции API для обработки объектных файлов ELF</para>
<indexterm zone="ch-system-libelf libelf">
<primary sortas="c-libelf">libelf</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>