source: chapter06/binutils.xml@ 1540ea0

Last change on this file since 1540ea0 was a0e1913, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Removed the package name from the dependencies titles.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multi-arch/BOOK@4691 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 9.7 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[c2133bc]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
[673b0d8]3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[752f4e5]6<sect1 id="ch-system-binutils" role="wrap">
[673b0d8]7<title>Binutils-&binutils-version;</title>
8<?dbhtml filename="binutils.html"?>
9
10<indexterm zone="ch-system-binutils"><primary sortas="a-Binutils">Binutils</primary></indexterm>
[6370fa6]11
[a001133]12<sect2 role="package"><title/>
[5888299]13<para>The Binutils package contains a linker, an assembler, and other tools for
14handling object files.</para>
15
[a001133]16<segmentedlist>
17<segtitle>&buildtime;</segtitle>
18<segtitle>&diskspace;</segtitle>
19<seglistitem><seg>1.4 SBU</seg><seg>167 MB</seg></seglistitem>
20</segmentedlist>
21
22<segmentedlist>
[a0e1913]23<segtitle>&dependencies;</segtitle>
[4dca1e2]24<seglistitem><seg>Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext,
25Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem>
[a001133]26</segmentedlist>
27</sect2>
28
29<sect2 role="installation">
30<title>Installation of Binutils</title>
[73aedd1d]31
[24a08b9]32<para>This package is known to have issues when its default
33optimization flags (including the <parameter>-march</parameter> and
34<parameter>-mcpu</parameter> options) are changed. If any environment
35variables that override default optimizations have been defined, such
[752f4e5]36as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
[24a08b9]37unset them when building Binutils.</para>
38
[69993f4]39<para>Verify that the PTYs are working properly inside the chroot
40environment. Check that everything is set up correctly by performing a
41simple test:</para>
[73aedd1d]42
43<screen><userinput>expect -c "spawn ls"</userinput></screen>
44
[ef13657]45<para>If the following message shows up, the chroot environment is not
46set up for proper PTY operation:</para>
[73aedd1d]47
[00cc7ce]48<screen><computeroutput>The system has no more ptys.
49Ask your system administrator to create more.</computeroutput></screen>
[73aedd1d]50
[69993f4]51<para>This issue needs to be resolved before running the test suites
[ef13657]52for Binutils and GCC.</para>
[73aedd1d]53
54<para>The Binutils documentation recommends building Binutils outside of the
55source directory in a dedicated build directory:</para>
56
57<screen><userinput>mkdir ../binutils-build
58cd ../binutils-build</userinput></screen>
59
[ef13657]60<para>Prepare Binutils for compilation:</para>
[73aedd1d]61
[00cc7ce]62<screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
63 --enable-shared</userinput></screen>
[73aedd1d]64
65<para>Compile the package:</para>
66
67<screen><userinput>make tooldir=/usr</userinput></screen>
68
[ef13657]69<para>Normally, the tooldir (the directory where the executables will
70ultimately be located) is set to <filename
71class="directory">$(exec_prefix)/$(target_alias)</filename>, which
[1cc7be0]72expands into <filename class="directory">/usr/i686-pc-linux-gnu</filename>.
73Because this is a custom system, this target-specific directory in <filename
[ef13657]74class="directory">/usr</filename> is not required. This setup would be
75used if the system was used to cross-compile (for example, compiling a
76package on an Intel machine that generates code that can be executed
77on PowerPC machines).</para>
78
79<important><para>The test suite for Binutils in this section is
80considered critical. Do not skip it under any
[90afe40d]81circumstances.</para></important>
82
[73aedd1d]83<para>Test the results:</para>
84
[ef13657]85<screen><userinput>make check</userinput></screen>
[73aedd1d]86
87<para>Install the package:</para>
88
89<screen><userinput>make tooldir=/usr install</userinput></screen>
90
[3c928f1]91<para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
[73aedd1d]92some packages:</para>
93
[673b0d8]94<screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
[73aedd1d]95
96</sect2>
[6370fa6]97
[5888299]98
[c6cb3aa]99<sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title>
[673b0d8]100
[c6cb3aa]101<segmentedlist>
102<segtitle>Installed programs</segtitle>
103<segtitle>Installed libraries</segtitle>
104<seglistitem><seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
[69993f4]105ranlib, readelf, size, strings, and strip</seg>
106<seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg></seglistitem>
[c6cb3aa]107</segmentedlist>
[673b0d8]108
[2256873]109<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
[3ed279f]110<?dbfo list-presentation="list"?>
[c5f9180]111<?dbhtml list-presentation="table"?>
[673b0d8]112
[b8a819f]113<varlistentry id="addr2line">
114<term><command>addr2line</command></term>
[c6cb3aa]115<listitem>
[2256873]116<para>Translates program addresses to file names and line numbers;
117given an address and the name of an executable, it uses the debugging
[ef13657]118information in the executable to determine which source file and line
[2256873]119number are associated with the address</para>
[3ed279f]120<indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm>
[c6cb3aa]121</listitem>
122</varlistentry>
[673b0d8]123
[b8a819f]124<varlistentry id="ar">
125<term><command>ar</command></term>
[c6cb3aa]126<listitem>
[2256873]127<para>Creates, modifies, and extracts from archives</para>
[3ed279f]128<indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm>
[c6cb3aa]129</listitem>
130</varlistentry>
[673b0d8]131
[b8a819f]132<varlistentry id="as">
133<term><command>as</command></term>
[c6cb3aa]134<listitem>
[2256873]135<para>An assembler that assembles the output of <command>gcc</command>
136into object files</para>
[3ed279f]137<indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
[c6cb3aa]138</listitem>
139</varlistentry>
[673b0d8]140
[b8a819f]141<varlistentry id="c-filt">
142<term><command>c++filt</command></term>
[c6cb3aa]143<listitem>
[2256873]144<para>Used by the linker to de-mangle C++ and Java symbols and to keep
145overloaded functions from clashing</para>
[3ed279f]146<indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm>
[c6cb3aa]147</listitem>
148</varlistentry>
[673b0d8]149
[b8a819f]150<varlistentry id="gprof">
151<term><command>gprof</command></term>
[c6cb3aa]152<listitem>
[2256873]153<para>Displays call graph profile data</para>
[3ed279f]154<indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm>
[c6cb3aa]155</listitem>
156</varlistentry>
[673b0d8]157
[b8a819f]158<varlistentry id="ld">
159<term><command>ld</command></term>
[c6cb3aa]160<listitem>
[2256873]161<para>A linker that combines a number of object and archive files into a single file,
162relocating their data and tying up symbol references</para>
[3ed279f]163<indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm>
[c6cb3aa]164</listitem>
165</varlistentry>
166
[b8a819f]167<varlistentry id="nm">
168<term><command>nm</command></term>
[c6cb3aa]169<listitem>
[2256873]170<para>Lists the symbols occurring in a given object file</para>
[3ed279f]171<indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm>
[c6cb3aa]172</listitem>
173</varlistentry>
[73aedd1d]174
[b8a819f]175<varlistentry id="objcopy">
176<term><command>objcopy</command></term>
[c6cb3aa]177<listitem>
[2256873]178<para>Translates one type of object file into another</para>
[3ed279f]179<indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm>
[c6cb3aa]180</listitem>
181</varlistentry>
[673b0d8]182
[b8a819f]183<varlistentry id="objdump">
184<term><command>objdump</command></term>
[c6cb3aa]185<listitem>
[2256873]186<para>Displays information about the given object file, with options
187controlling the particular information to display; the information
[ef13657]188shown is useful to programmers who are working on the compilation
[2256873]189tools</para>
[3ed279f]190<indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm>
[c6cb3aa]191</listitem>
192</varlistentry>
193
[b8a819f]194<varlistentry id="ranlib">
195<term><command>ranlib</command></term>
[c6cb3aa]196<listitem>
[2256873]197<para>Generates an index of the contents of an archive and stores it
198in the archive; the index lists all of the symbols defined by archive
199members that are relocatable object files</para>
[3ed279f]200<indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm>
[c6cb3aa]201</listitem>
202</varlistentry>
[673b0d8]203
[b8a819f]204<varlistentry id="readelf">
205<term><command>readelf</command></term>
[c6cb3aa]206<listitem>
[2256873]207<para>Displays information about ELF type binaries</para>
[3ed279f]208<indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm>
[c6cb3aa]209</listitem>
210</varlistentry>
[673b0d8]211
[b8a819f]212<varlistentry id="size">
213<term><command>size</command></term>
[c6cb3aa]214<listitem>
[2256873]215<para>Lists the section sizes and the total size for the given object files</para>
[3ed279f]216<indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm>
[c6cb3aa]217</listitem>
218</varlistentry>
[673b0d8]219
[b8a819f]220<varlistentry id="strings">
221<term><command>strings</command></term>
[c6cb3aa]222<listitem>
[2256873]223<para>Outputs, for each given file, the sequences of printable
[ef13657]224characters that are of at least the specified length (defaulting to
[2256873]225four); for object files, it prints, by default, only the strings from
226the initializing and loading sections while for other types of files, it
227scans the entire file</para>
[3ed279f]228<indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm>
[c6cb3aa]229</listitem>
230</varlistentry>
[673b0d8]231
[b8a819f]232<varlistentry id="strip">
233<term><command>strip</command></term>
[c6cb3aa]234<listitem>
[2256873]235<para>Discards symbols from object files</para>
[3ed279f]236<indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm>
[c6cb3aa]237</listitem>
238</varlistentry>
[673b0d8]239
[b8a819f]240<varlistentry id="libiberty">
[e63529b]241<term><filename class="libraryfile">libiberty</filename></term>
[c6cb3aa]242<listitem>
[2256873]243<para>Contains routines used by various GNU programs, including
[ef13657]244<command>getopt</command>, <command>obstack</command>,
[69993f4]245<command>strerror</command>, <command>strtol</command>, and
[2256873]246<command>strtoul</command></para>
[3ed279f]247<indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm>
[c6cb3aa]248</listitem>
249</varlistentry>
[673b0d8]250
[b8a819f]251<varlistentry id="libbfd">
[e63529b]252<term><filename class="libraryfile">libbfd</filename></term>
[c6cb3aa]253<listitem>
[2256873]254<para>The Binary File Descriptor library</para>
[3ed279f]255<indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm>
[c6cb3aa]256</listitem>
257</varlistentry>
[673b0d8]258
[b8a819f]259<varlistentry id="libopcodes">
[e63529b]260<term><filename class="libraryfile">libopcodes</filename></term>
[c6cb3aa]261<listitem>
[2256873]262<para>A library for dealing with opcodes&mdash;the <quote>readable
263text</quote> versions of instructions for the processor;
264it is used for building utilities like
265<command>objdump</command>.</para>
[3ed279f]266<indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm>
[c6cb3aa]267</listitem>
268</varlistentry>
269</variablelist>
[673b0d8]270
271</sect2>
272
273</sect1>
[ef13657]274
Note: See TracBrowser for help on using the repository browser.