source: chapter06/binutils.xml@ ba9a546

7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since ba9a546 was ba9a546, checked in by Krejzi <krejzi@…>, 10 years ago

Merge lfs svn, dbus 1.8.6 update, fix md5sums repored by spiky.

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

  • Property mode set to 100644
File size: 13.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-binutils" role="wrap">
9 <?dbhtml filename="binutils.html"?>
10
11 <sect1info condition="script">
12 <productname>binutils</productname>
13 <productnumber>&binutils-version;</productnumber>
14 <address>&binutils-url;</address>
15 </sect1info>
16
17 <title>Binutils-&binutils-version;</title>
18
19 <indexterm zone="ch-system-binutils">
20 <primary sortas="a-Binutils">Binutils</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Binutils package contains a linker, an assembler, and other
27 tools for handling object files.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&binutils-ch6-sbu;</seg>
35 <seg>&binutils-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Binutils</title>
43
44 <para>Verify that the PTYs are working properly inside the chroot
45 environment by performing a simple test:</para>
46
47<screen><userinput remap="test">expect -c "spawn ls"</userinput></screen>
48
49 <para>This command should output the following:</para>
50
51<screen><computeroutput>spawn ls</computeroutput></screen>
52
53 <para>If, instead, the output includes the message below, then the environment
54 is not set up for proper PTY operation. This issue needs to be resolved before
55 running the test suites for Binutils and GCC:</para>
56
57<screen><computeroutput>The system has no more ptys.
58Ask your system administrator to create more.</computeroutput></screen>
59
60 <para>Suppress the installation of an outdated
61 <filename>standards.info</filename> file as a newer one is installed later
62 on in the Autoconf instructions:</para>
63
64<screen><userinput remap="pre">rm -fv etc/standards.info
65sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in</userinput></screen>
66
67 <para>Add an upstream patch to use GCC's link time optimization (LTO)
68 by default:</para>
69
70<screen><userinput remap="pre">patch -Np1 -i ../&binutils-lto-patch;</userinput></screen>
71
72 <para>The Binutils documentation recommends building Binutils outside of the
73 source directory in a dedicated build directory:</para>
74
75<screen><userinput remap="pre">mkdir -v ../binutils-build
76cd ../binutils-build</userinput></screen>
77
78 <para>Prepare Binutils for compilation:</para>
79
80<screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/usr \
81 --enable-shared \
82 --disable-werror</userinput></screen>
83
84 <para>Compile the package:</para>
85
86<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
87
88 <variablelist>
89 <title>The meaning of the make parameter:</title>
90
91 <varlistentry>
92 <term><parameter>tooldir=/usr</parameter></term>
93 <listitem>
94 <para>Normally, the tooldir (the directory where the executables will
95 ultimately be located) is set to <filename
96 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
97 example, x86_64 machines would expand that to <filename
98 class="directory">/usr/x86_64-unknown-linux-gnu</filename>. Because this is
99 a custom system, this target-specific directory in <filename
100 class="directory">/usr</filename> is not required. <filename
101 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
102 used if the system was used to cross-compile (for example, compiling a
103 package on an Intel machine that generates code that can be executed
104 on PowerPC machines).</para>
105 </listitem>
106 </varlistentry>
107
108 </variablelist>
109
110 <important>
111 <para>The test suite for Binutils in this section is considered critical.
112 Do not skip it under any circumstances.</para>
113 </important>
114
115 <para>Test the results:</para>
116
117<screen><userinput remap="test">make check</userinput></screen>
118
119 <para>Six tests in the lto.exp testsuite are known to fail due
120 to changes in the most recent version of gcc.</para>
121
122 <para>Install the package:</para>
123
124<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
125
126 </sect2>
127
128 <sect2 id="contents-binutils" role="content">
129 <title>Contents of Binutils</title>
130
131 <segmentedlist>
132 <segtitle>Installed programs</segtitle>
133 <segtitle>Installed libraries</segtitle>
134 <segtitle>Installed directory</segtitle>
135
136 <seglistitem>
137 <seg>addr2line, ar, as, c++filt, elfedit, gprof, ld, ld.bfd, nm,
138 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
139 <seg><!--libiberty.a,--> libbfd.{a,so}, and libopcodes.{a,so}</seg>
140 <seg>/usr/lib/ldscripts</seg>
141 </seglistitem>
142 </segmentedlist>
143
144 <variablelist>
145 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
146 <?dbfo list-presentation="list"?>
147 <?dbhtml list-presentation="table"?>
148
149 <varlistentry id="addr2line">
150 <term><command>addr2line</command></term>
151 <listitem>
152 <para>Translates program addresses to file names and line numbers;
153 given an address and the name of an executable, it uses the debugging
154 information in the executable to determine which source file and line
155 number are associated with the address</para>
156 <indexterm zone="ch-system-binutils addr2line">
157 <primary sortas="b-addr2line">addr2line</primary>
158 </indexterm>
159 </listitem>
160 </varlistentry>
161
162 <varlistentry id="ar">
163 <term><command>ar</command></term>
164 <listitem>
165 <para>Creates, modifies, and extracts from archives</para>
166 <indexterm zone="ch-system-binutils ar">
167 <primary sortas="b-ar">ar</primary>
168 </indexterm>
169 </listitem>
170 </varlistentry>
171
172 <varlistentry id="as">
173 <term><command>as</command></term>
174 <listitem>
175 <para>An assembler that assembles the output of <command>gcc</command>
176 into object files</para>
177 <indexterm zone="ch-system-binutils as">
178 <primary sortas="b-as">as</primary>
179 </indexterm>
180 </listitem>
181 </varlistentry>
182
183 <varlistentry id="c-filt">
184 <term><command>c++filt</command></term>
185 <listitem>
186 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
187 overloaded functions from clashing</para>
188 <indexterm zone="ch-system-binutils c-filt">
189 <primary sortas="b-c++filt">c++filt</primary>
190 </indexterm>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry id="elfedit">
195 <term><command>elfedit</command></term>
196 <listitem>
197 <para>Updates the ELF header of ELF files</para>
198 <indexterm zone="ch-system-binutils elfedit">
199 <primary sortas="b-elfedit">elfedit</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="gprof">
205 <term><command>gprof</command></term>
206 <listitem>
207 <para>Displays call graph profile data</para>
208 <indexterm zone="ch-system-binutils gprof">
209 <primary sortas="b-gprof">gprof</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
214 <varlistentry id="ld">
215 <term><command>ld</command></term>
216 <listitem>
217 <para>A linker that combines a number of object and archive files
218 into a single file, relocating their data and tying up symbol
219 references</para>
220 <indexterm zone="ch-system-binutils ld">
221 <primary sortas="b-ld">ld</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="ld.bfd">
227 <term><command>ld.bfd</command></term>
228 <listitem>
229 <para>Hard link to <command>ld</command></para>
230 <indexterm zone="ch-system-binutils ld.bfd">
231 <primary sortas="b-ld.bfd">ld.bfd</primary>
232 </indexterm>
233 </listitem>
234 </varlistentry>
235
236 <varlistentry id="nm">
237 <term><command>nm</command></term>
238 <listitem>
239 <para>Lists the symbols occurring in a given object file</para>
240 <indexterm zone="ch-system-binutils nm">
241 <primary sortas="b-nm">nm</primary>
242 </indexterm>
243 </listitem>
244 </varlistentry>
245
246 <varlistentry id="objcopy">
247 <term><command>objcopy</command></term>
248 <listitem>
249 <para>Translates one type of object file into another</para>
250 <indexterm zone="ch-system-binutils objcopy">
251 <primary sortas="b-objcopy">objcopy</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="objdump">
257 <term><command>objdump</command></term>
258 <listitem>
259 <para>Displays information about the given object file, with options
260 controlling the particular information to display; the information
261 shown is useful to programmers who are working on the compilation
262 tools</para>
263 <indexterm zone="ch-system-binutils objdump">
264 <primary sortas="b-objdump">objdump</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="ranlib">
270 <term><command>ranlib</command></term>
271 <listitem>
272 <para>Generates an index of the contents of an archive and stores it
273 in the archive; the index lists all of the symbols defined by archive
274 members that are relocatable object files</para>
275 <indexterm zone="ch-system-binutils ranlib">
276 <primary sortas="b-ranlib">ranlib</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="readelf">
282 <term><command>readelf</command></term>
283 <listitem>
284 <para>Displays information about ELF type binaries</para>
285 <indexterm zone="ch-system-binutils readelf">
286 <primary sortas="b-readelf">readelf</primary>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290
291 <varlistentry id="size">
292 <term><command>size</command></term>
293 <listitem>
294 <para>Lists the section sizes and the total size for the given
295 object files</para>
296 <indexterm zone="ch-system-binutils size">
297 <primary sortas="b-size">size</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="strings">
303 <term><command>strings</command></term>
304 <listitem>
305 <para>Outputs, for each given file, the sequences of printable
306 characters that are of at least the specified length (defaulting to
307 four); for object files, it prints, by default, only the strings from
308 the initializing and loading sections while for other types of files, it
309 scans the entire file</para>
310 <indexterm zone="ch-system-binutils strings">
311 <primary sortas="b-strings">strings</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="strip">
317 <term><command>strip</command></term>
318 <listitem>
319 <para>Discards symbols from object files</para>
320 <indexterm zone="ch-system-binutils strip">
321 <primary sortas="b-strip">strip</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325<!--
326 <varlistentry id="libiberty">
327 <term><filename class="libraryfile">libiberty</filename></term>
328 <listitem>
329 <para>Contains routines used by various GNU programs, including
330 <command>getopt</command>, <command>obstack</command>,
331 <command>strerror</command>, <command>strtol</command>, and
332 <command>strtoul</command></para>
333 <indexterm zone="ch-system-binutils libiberty">
334 <primary sortas="c-libiberty">libiberty</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338-->
339 <varlistentry id="libbfd">
340 <term><filename class="libraryfile">libbfd</filename></term>
341 <listitem>
342 <para>The Binary File Descriptor library</para>
343 <indexterm zone="ch-system-binutils libbfd">
344 <primary sortas="c-libbfd">libbfd</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348
349 <varlistentry id="libopcodes">
350 <term><filename class="libraryfile">libopcodes</filename></term>
351 <listitem>
352 <para>A library for dealing with opcodes&mdash;the <quote>readable
353 text</quote> versions of instructions for the processor;
354 it is used for building utilities like
355 <command>objdump</command>.</para>
356 <indexterm zone="ch-system-binutils libopcodes">
357 <primary sortas="c-libopcodes">libopcodes</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 </variablelist>
363
364 </sect2>
365
366</sect1>
Note: See TracBrowser for help on using the repository browser.