Ignore:
Timestamp:
02/02/2006 09:35:05 PM (19 years ago)
Author:
Matthew Burgess <matthew@…>
Children:
a7fe252
Parents:
0e5c784
Message:

Merge r7314:7324, in order to bring the branch up to date with trunk

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/binutils.xml

    r0e5c784 r9e26f63  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
     3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
    34  <!ENTITY % general-entities SYSTEM "../general.ent">
    45  %general-entities;
    56]>
     7
    68<sect1 id="ch-system-binutils" role="wrap">
    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>
    11 
    12 <sect2 role="package"><title/>
    13 <para>The Binutils package contains a linker, an assembler, and other tools for
    14 handling object files.</para>
    15 
    16 <segmentedlist>
    17 <segtitle>&buildtime;</segtitle>
    18 <segtitle>&diskspace;</segtitle>
    19 <seglistitem><seg>1.3 SBU</seg><seg>158 MB</seg></seglistitem>
    20 </segmentedlist>
    21 
    22 <segmentedlist>
    23 <segtitle>&dependencies;</segtitle>
    24 <seglistitem><seg>Bash, Coreutils, Diffutils, GCC, Gettext,
    25 Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem>
    26 </segmentedlist>
    27 </sect2>
    28 
    29 <sect2 role="installation">
    30 <title>Installation of Binutils</title>
    31 
    32 <para>Verify that the PTYs are working properly inside the chroot
    33 environment. Check that everything is set up correctly by performing a
    34 simple test:</para>
     9  <?dbhtml filename="binutils.html"?>
     10
     11  <title>Binutils-&binutils-version;</title>
     12
     13  <indexterm zone="ch-system-binutils">
     14    <primary sortas="a-Binutils">Binutils</primary>
     15  </indexterm>
     16
     17  <sect2 role="package">
     18    <title/>
     19
     20    <para>The Binutils package contains a linker, an assembler, and other
     21    tools for handling object files.</para>
     22
     23    <segmentedlist>
     24      <segtitle>&buildtime;</segtitle>
     25      <segtitle>&diskspace;</segtitle>
     26
     27      <seglistitem>
     28        <seg>1.3 SBU</seg>
     29        <seg>158 MB</seg>
     30      </seglistitem>
     31    </segmentedlist>
     32
     33    <segmentedlist>
     34      <segtitle>&dependencies;</segtitle>
     35
     36      <seglistitem>
     37        <seg>Bash, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4,
     38        Make, Perl, Sed, and Texinfo</seg>
     39      </seglistitem>
     40    </segmentedlist>
     41
     42  </sect2>
     43
     44  <sect2 role="installation">
     45    <title>Installation of Binutils</title>
     46
     47    <para>Verify that the PTYs are working properly inside the chroot
     48    environment. Check that everything is set up correctly by performing a
     49    simple test:</para>
    3550
    3651<screen><userinput>expect -c "spawn ls"</userinput></screen>
    3752
    38 <para>If the following message shows up, the chroot environment is not
    39 set up for proper PTY operation:</para>
    40 
    41 <screen><computeroutput>The system has no more ptys. 
     53    <para>If the following message shows up, the chroot environment is not
     54    set up for proper PTY operation:</para>
     55
     56<screen><computeroutput>The system has no more ptys.
    4257Ask your system administrator to create more.</computeroutput></screen>
    4358
    44 <para>This issue needs to be resolved before running the test suites
    45 for Binutils and GCC.</para>
    46 
    47 <para>The Binutils documentation recommends building Binutils outside of the
    48 source directory in a dedicated build directory:</para>
     59    <para>This issue needs to be resolved before running the test suites
     60    for Binutils and GCC.</para>
     61
     62    <para>The Binutils documentation recommends building Binutils outside of the
     63    source directory in a dedicated build directory:</para>
    4964
    5065<screen><userinput>mkdir -v ../binutils-build
    5166cd ../binutils-build</userinput></screen>
    5267
    53 <para>Prepare Binutils for compilation:</para>
     68    <para>Prepare Binutils for compilation:</para>
    5469
    5570<screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
    5671    --enable-shared</userinput></screen>
    5772
    58 <para>Compile the package:</para>
     73    <para>Compile the package:</para>
    5974
    6075<screen><userinput>make tooldir=/usr</userinput></screen>
    6176
    62 <para>Normally, the tooldir (the directory where the executables will ultimately
    63 be located) is set to <filename
    64 class="directory">$(exec_prefix)/$(target_alias)</filename>. For example, i686
    65 machines would expand that to <filename
    66 class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is a custom
    67 system, this target-specific directory in <filename
    68 class="directory">/usr</filename> is not required. <filename
    69 class="directory">$(exec_prefix)/$(target_alias)</filename> would be used if the
    70 system was used to cross-compile (for example, compiling a package on an Intel
    71 machine that generates code that can be executed on PowerPC machines).</para>
    72 
    73 <important><para>The test suite for Binutils in this section is
    74 considered critical. Do not skip it under any
    75 circumstances.</para></important>
    76 
    77 <para>Test the results:</para>
     77    <variablelist>
     78      <title>The meaning of the make parameter:</title>
     79
     80      <varlistentry>
     81        <term><parameter>tooldir=/usr</parameter></term>
     82        <listitem>
     83          <para>Normally, the tooldir (the directory where the executables will
     84          ultimately be located) is set to <filename
     85          class="directory">$(exec_prefix)/$(target_alias)</filename>. For
     86          example, i686 machines would expand that to <filename
     87          class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is
     88          a custom system, this target-specific directory in <filename
     89          class="directory">/usr</filename> is not required. <filename
     90          class="directory">$(exec_prefix)/$(target_alias)</filename> would be
     91          used if the system was used to cross-compile (for example, compiling a
     92          package on an Intel machine that generates code that can be executed
     93          on PowerPC machines).</para>
     94        </listitem>
     95      </varlistentry>
     96
     97    </variablelist>
     98
     99    <important>
     100      <para>The test suite for Binutils in this section is considered critical.
     101      Do not skip it under any circumstances.</para>
     102    </important>
     103
     104    <para>Test the results:</para>
    78105
    79106<screen><userinput>make check</userinput></screen>
    80107
    81 <para>Install the package:</para>
     108    <para>Install the package:</para>
    82109
    83110<screen><userinput>make tooldir=/usr install</userinput></screen>
    84111
    85 <para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
    86 some packages:</para>
     112    <para>Install the <filename class="headerfile">libiberty</filename> header
     113    file that is needed by some packages:</para>
    87114
    88115<screen><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
    89116
    90 </sect2>
    91 
    92 
    93 <sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title>
    94 
    95 <segmentedlist>
    96 <segtitle>Installed programs</segtitle>
    97 <segtitle>Installed libraries</segtitle>
    98 <seglistitem><seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
    99 ranlib, readelf, size, strings, and strip</seg>
    100 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg></seglistitem>
    101 </segmentedlist>
    102 
    103 <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
    104 <?dbfo list-presentation="list"?>
    105 <?dbhtml list-presentation="table"?>
    106 
    107 <varlistentry id="addr2line">
    108 <term><command>addr2line</command></term>
    109 <listitem>
    110 <para>Translates program addresses to file names and line numbers;
    111 given an address and the name of an executable, it uses the debugging
    112 information in the executable to determine which source file and line
    113 number are associated with the address</para>
    114 <indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm>
    115 </listitem>
    116 </varlistentry>
    117 
    118 <varlistentry id="ar">
    119 <term><command>ar</command></term>
    120 <listitem>
    121 <para>Creates, modifies, and extracts from archives</para>
    122 <indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm>
    123 </listitem>
    124 </varlistentry>
    125 
    126 <varlistentry id="as">
    127 <term><command>as</command></term>
    128 <listitem>
    129 <para>An assembler that assembles the output of <command>gcc</command>
    130 into object files</para>
    131 <indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
    132 </listitem>
    133 </varlistentry>
    134 
    135 <varlistentry id="c-filt">
    136 <term><command>c++filt</command></term>
    137 <listitem>
    138 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
    139 overloaded functions from clashing</para>
    140 <indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm>
    141 </listitem>
    142 </varlistentry>
    143 
    144 <varlistentry id="gprof">
    145 <term><command>gprof</command></term>
    146 <listitem>
    147 <para>Displays call graph profile data</para>
    148 <indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm>
    149 </listitem>
    150 </varlistentry>
    151 
    152 <varlistentry id="ld">
    153 <term><command>ld</command></term>
    154 <listitem>
    155 <para>A linker that combines a number of object and archive files into a single file,
    156 relocating their data and tying up symbol references</para>
    157 <indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm>
    158 </listitem>
    159 </varlistentry>
    160 
    161 <varlistentry id="nm">
    162 <term><command>nm</command></term>
    163 <listitem>
    164 <para>Lists the symbols occurring in a given object file</para>
    165 <indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm>
    166 </listitem>
    167 </varlistentry>
    168 
    169 <varlistentry id="objcopy">
    170 <term><command>objcopy</command></term>
    171 <listitem>
    172 <para>Translates one type of object file into another</para>
    173 <indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm>
    174 </listitem>
    175 </varlistentry>
    176 
    177 <varlistentry id="objdump">
    178 <term><command>objdump</command></term>
    179 <listitem>
    180 <para>Displays information about the given object file, with options
    181 controlling the particular information to display; the information
    182 shown is useful to programmers who are working on the compilation
    183 tools</para>
    184 <indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm>
    185 </listitem>
    186 </varlistentry>
    187 
    188 <varlistentry id="ranlib">
    189 <term><command>ranlib</command></term>
    190 <listitem>
    191 <para>Generates an index of the contents of an archive and stores it
    192 in the archive; the index lists all of the symbols defined by archive
    193 members that are relocatable object files</para>
    194 <indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm>
    195 </listitem>
    196 </varlistentry>
    197 
    198 <varlistentry id="readelf">
    199 <term><command>readelf</command></term>
    200 <listitem>
    201 <para>Displays information about ELF type binaries</para>
    202 <indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm>
    203 </listitem>
    204 </varlistentry>
    205 
    206 <varlistentry id="size">
    207 <term><command>size</command></term>
    208 <listitem>
    209 <para>Lists the section sizes and the total size for the given object files</para>
    210 <indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm>
    211 </listitem>
    212 </varlistentry>
    213 
    214 <varlistentry id="strings">
    215 <term><command>strings</command></term>
    216 <listitem>
    217 <para>Outputs, for each given file, the sequences of printable
    218 characters that are of at least the specified length (defaulting to
    219 four); for object files, it prints, by default, only the strings from
    220 the initializing and loading sections while for other types of files, it
    221 scans the entire file</para>
    222 <indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm>
    223 </listitem>
    224 </varlistentry>
    225 
    226 <varlistentry id="strip">
    227 <term><command>strip</command></term>
    228 <listitem>
    229 <para>Discards symbols from object files</para>
    230 <indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm>
    231 </listitem>
    232 </varlistentry>
    233 
    234 <varlistentry id="libiberty">
    235 <term><filename class="libraryfile">libiberty</filename></term>
    236 <listitem>
    237 <para>Contains routines used by various GNU programs, including
    238 <command>getopt</command>, <command>obstack</command>,
    239 <command>strerror</command>, <command>strtol</command>, and
    240 <command>strtoul</command></para>
    241 <indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm>
    242 </listitem>
    243 </varlistentry>
    244 
    245 <varlistentry id="libbfd">
    246 <term><filename class="libraryfile">libbfd</filename></term>
    247 <listitem>
    248 <para>The Binary File Descriptor library</para>
    249 <indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm>
    250 </listitem>
    251 </varlistentry>
    252 
    253 <varlistentry id="libopcodes">
    254 <term><filename class="libraryfile">libopcodes</filename></term>
    255 <listitem>
    256 <para>A library for dealing with opcodes&mdash;the <quote>readable
    257 text</quote> versions of instructions for the processor;
    258 it is used for building utilities like
    259 <command>objdump</command>.</para>
    260 <indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm>
    261 </listitem>
    262 </varlistentry>
    263 </variablelist>
    264 
    265 </sect2>
     117  </sect2>
     118
     119
     120  <sect2 id="contents-binutils" role="content">
     121    <title>Contents of Binutils</title>
     122
     123    <segmentedlist>
     124      <segtitle>Installed programs</segtitle>
     125      <segtitle>Installed libraries</segtitle>
     126
     127      <seglistitem>
     128        <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
     129        ranlib, readelf, size, strings, and strip</seg>
     130        <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
     131      </seglistitem>
     132    </segmentedlist>
     133
     134    <variablelist>
     135      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
     136      <?dbfo list-presentation="list"?>
     137      <?dbhtml list-presentation="table"?>
     138
     139      <varlistentry id="addr2line">
     140        <term><command>addr2line</command></term>
     141        <listitem>
     142          <para>Translates program addresses to file names and line numbers;
     143          given an address and the name of an executable, it uses the debugging
     144          information in the executable to determine which source file and line
     145          number are associated with the address</para>
     146          <indexterm zone="ch-system-binutils addr2line">
     147            <primary sortas="b-addr2line">addr2line</primary>
     148          </indexterm>
     149        </listitem>
     150      </varlistentry>
     151
     152      <varlistentry id="ar">
     153        <term><command>ar</command></term>
     154        <listitem>
     155          <para>Creates, modifies, and extracts from archives</para>
     156          <indexterm zone="ch-system-binutils ar">
     157            <primary sortas="b-ar">ar</primary>
     158          </indexterm>
     159        </listitem>
     160      </varlistentry>
     161
     162      <varlistentry id="as">
     163        <term><command>as</command></term>
     164        <listitem>
     165          <para>An assembler that assembles the output of <command>gcc</command>
     166          into object files</para>
     167          <indexterm zone="ch-system-binutils as">
     168            <primary sortas="b-as">as</primary>
     169          </indexterm>
     170        </listitem>
     171      </varlistentry>
     172
     173      <varlistentry id="c-filt">
     174        <term><command>c++filt</command></term>
     175        <listitem>
     176          <para>Used by the linker to de-mangle C++ and Java symbols and to keep
     177          overloaded functions from clashing</para>
     178          <indexterm zone="ch-system-binutils c-filt">
     179            <primary sortas="b-c++filt">c++filt</primary>
     180          </indexterm>
     181        </listitem>
     182      </varlistentry>
     183
     184      <varlistentry id="gprof">
     185        <term><command>gprof</command></term>
     186        <listitem>
     187          <para>Displays call graph profile data</para>
     188          <indexterm zone="ch-system-binutils gprof">
     189            <primary sortas="b-gprof">gprof</primary>
     190          </indexterm>
     191        </listitem>
     192      </varlistentry>
     193
     194      <varlistentry id="ld">
     195        <term><command>ld</command></term>
     196        <listitem>
     197          <para>A linker that combines a number of object and archive files
     198          into a single file, relocating their data and tying up symbol
     199          references</para>
     200          <indexterm zone="ch-system-binutils ld">
     201            <primary sortas="b-ld">ld</primary>
     202          </indexterm>
     203        </listitem>
     204      </varlistentry>
     205
     206      <varlistentry id="nm">
     207        <term><command>nm</command></term>
     208        <listitem>
     209          <para>Lists the symbols occurring in a given object file</para>
     210          <indexterm zone="ch-system-binutils nm">
     211            <primary sortas="b-nm">nm</primary>
     212          </indexterm>
     213        </listitem>
     214      </varlistentry>
     215
     216      <varlistentry id="objcopy">
     217        <term><command>objcopy</command></term>
     218        <listitem>
     219          <para>Translates one type of object file into another</para>
     220          <indexterm zone="ch-system-binutils objcopy">
     221            <primary sortas="b-objcopy">objcopy</primary>
     222          </indexterm>
     223        </listitem>
     224      </varlistentry>
     225
     226      <varlistentry id="objdump">
     227        <term><command>objdump</command></term>
     228        <listitem>
     229          <para>Displays information about the given object file, with options
     230          controlling the particular information to display; the information
     231          shown is useful to programmers who are working on the compilation
     232          tools</para>
     233          <indexterm zone="ch-system-binutils objdump">
     234            <primary sortas="b-objdump">objdump</primary>
     235          </indexterm>
     236        </listitem>
     237      </varlistentry>
     238
     239      <varlistentry id="ranlib">
     240        <term><command>ranlib</command></term>
     241        <listitem>
     242          <para>Generates an index of the contents of an archive and stores it
     243          in the archive; the index lists all of the symbols defined by archive
     244          members that are relocatable object files</para>
     245          <indexterm zone="ch-system-binutils ranlib">
     246            <primary sortas="b-ranlib">ranlib</primary>
     247          </indexterm>
     248        </listitem>
     249      </varlistentry>
     250
     251      <varlistentry id="readelf">
     252        <term><command>readelf</command></term>
     253        <listitem>
     254          <para>Displays information about ELF type binaries</para>
     255          <indexterm zone="ch-system-binutils readelf">
     256            <primary sortas="b-readelf">readelf</primary>
     257          </indexterm>
     258        </listitem>
     259      </varlistentry>
     260
     261      <varlistentry id="size">
     262        <term><command>size</command></term>
     263        <listitem>
     264          <para>Lists the section sizes and the total size for the given
     265          object files</para>
     266          <indexterm zone="ch-system-binutils size">
     267            <primary sortas="b-size">size</primary>
     268          </indexterm>
     269        </listitem>
     270      </varlistentry>
     271
     272      <varlistentry id="strings">
     273        <term><command>strings</command></term>
     274        <listitem>
     275          <para>Outputs, for each given file, the sequences of printable
     276          characters that are of at least the specified length (defaulting to
     277          four); for object files, it prints, by default, only the strings from
     278          the initializing and loading sections while for other types of files, it
     279          scans the entire file</para>
     280          <indexterm zone="ch-system-binutils strings">
     281            <primary sortas="b-strings">strings</primary>
     282          </indexterm>
     283        </listitem>
     284      </varlistentry>
     285
     286      <varlistentry id="strip">
     287        <term><command>strip</command></term>
     288        <listitem>
     289          <para>Discards symbols from object files</para>
     290          <indexterm zone="ch-system-binutils strip">
     291            <primary sortas="b-strip">strip</primary>
     292          </indexterm>
     293        </listitem>
     294      </varlistentry>
     295
     296      <varlistentry id="libiberty">
     297        <term><filename class="libraryfile">libiberty</filename></term>
     298        <listitem>
     299          <para>Contains routines used by various GNU programs, including
     300          <command>getopt</command>, <command>obstack</command>,
     301          <command>strerror</command>, <command>strtol</command>, and
     302          <command>strtoul</command></para>
     303          <indexterm zone="ch-system-binutils libiberty">
     304            <primary sortas="c-libiberty">libiberty</primary>
     305          </indexterm>
     306        </listitem>
     307      </varlistentry>
     308
     309      <varlistentry id="libbfd">
     310        <term><filename class="libraryfile">libbfd</filename></term>
     311        <listitem>
     312          <para>The Binary File Descriptor library</para>
     313          <indexterm zone="ch-system-binutils libbfd">
     314            <primary sortas="c-libbfd">libbfd</primary>
     315          </indexterm>
     316        </listitem>
     317      </varlistentry>
     318
     319      <varlistentry id="libopcodes">
     320        <term><filename class="libraryfile">libopcodes</filename></term>
     321        <listitem>
     322          <para>A library for dealing with opcodes&mdash;the <quote>readable
     323          text</quote> versions of instructions for the processor;
     324          it is used for building utilities like
     325          <command>objdump</command>.</para>
     326          <indexterm zone="ch-system-binutils libopcodes">
     327            <primary sortas="c-libopcodes">libopcodes</primary>
     328          </indexterm>
     329        </listitem>
     330      </varlistentry>
     331
     332    </variablelist>
     333
     334  </sect2>
    266335
    267336</sect1>
    268 
Note: See TracChangeset for help on using the changeset viewer.