source: chapter06/binutils.xml@ 5998892

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 5998892 was 5998892, checked in by Matthew Burgess <matthew@…>, 19 years ago

Add -v to commands that accept it

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

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