source: chapter08/binutils.xml@ ea0f48e

11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 arm ml-11.0 multilib trunk xry111/clfs-ng xry111/glibc-2.34 xry111/lfs-next
Last change on this file since ea0f48e was ea0f48e, checked in by Xi Ruoyao <xry111@…>, 11 months ago

binutils: typo

  • Property mode set to 100644
File size: 15.6 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-fin-sbu;</seg>
35 <seg>&binutils-fin-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>An error in the building system causes the shipped man pages to
61 be empty. Workaround the issue and remove the shipped man pages, so the
62 man pages will be regenerated correctly:</para>
63
64<screen><userinput remap="pre">sed -i '63d' etc/texi2pod.pl
65find -name \*.1 -delete</userinput></screen>
66
67 <para>Now remove one test that prevents the tests from running
68 to completion:</para>
69
70<screen><userinput remap="pre">sed -i '/@\tincremental_copy/d' gold/testsuite/Makefile.in</userinput></screen>
71
72 <para>The Binutils documentation recommends building Binutils
73 in a dedicated build directory:</para>
74
75<screen><userinput remap="pre">mkdir -v build
76cd build</userinput></screen>
77
78 <para>Prepare Binutils for compilation:</para>
79
80<screen><userinput remap="configure">../configure --prefix=/usr \
81 --enable-gold \
82 --enable-ld=default \
83 --enable-plugins \
84 --enable-shared \
85 --disable-werror \
86 --enable-64-bit-bfd \
87 --with-system-zlib</userinput></screen>
88 <variablelist>
89 <title>The meaning of the configure parameters:</title>
90
91 <varlistentry>
92 <term><parameter>--enable-gold</parameter></term>
93 <listitem>
94 <para>Build the gold linker and install it as ld.gold (along side the
95 default linker).</para>
96 </listitem>
97 </varlistentry>
98
99 <varlistentry>
100 <term><parameter>--enable-ld=default</parameter></term>
101 <listitem>
102 <para>Build the original bfd linker and install it as both ld (the
103 default linker) and ld.bfd.</para>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry>
108 <term><parameter>--enable-plugins</parameter></term>
109 <listitem>
110 <para>Enables plugin support for the linker.</para>
111 </listitem>
112 </varlistentry>
113
114 <varlistentry>
115 <term><parameter>--enable-64-bit-bfd</parameter></term>
116 <listitem>
117 <para>Enables 64-bit support (on hosts with narrower word sizes).
118 May not be needed on 64-bit systems, but does no harm.</para>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term><parameter>--with-system-zlib</parameter></term>
124 <listitem>
125 <para>Use the installed zlib library rather than building the
126 included version.</para>
127 </listitem>
128 </varlistentry>
129
130 </variablelist>
131
132 <para>Compile the package:</para>
133
134<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
135
136 <variablelist>
137 <title>The meaning of the make parameter:</title>
138
139 <varlistentry>
140 <term><parameter>tooldir=/usr</parameter></term>
141 <listitem>
142 <para>Normally, the tooldir (the directory where the executables will
143 ultimately be located) is set to <filename
144 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
145 example, x86_64 machines would expand that to <filename
146 class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
147 a custom system, this target-specific directory in <filename
148 class="directory">/usr</filename> is not required. <filename
149 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
150 used if the system was used to cross-compile (for example, compiling a
151 package on an Intel machine that generates code that can be executed
152 on PowerPC machines).</para>
153 </listitem>
154 </varlistentry>
155
156 </variablelist>
157
158 <important>
159 <para>The test suite for Binutils in this section is considered critical.
160 Do not skip it under any circumstances.</para>
161 </important>
162
163 <para>Test the results:</para>
164
165<screen><userinput remap="test">make -k check</userinput></screen>
166
167 <para>Four tests related to zlib are known to fail.</para>
168<!--
169 <para>Seven gold tests are known to fail with gcc-11.1.0</para>
170
171 <para>Four ld tests named <quote>Run property ...</quote> are known to
172 fail.</para>
173 -->
174 <para>Install the package:</para>
175
176<screen><userinput remap="install">make tooldir=/usr install -j1</userinput></screen>
177
178 <para>Remove useless static libraries:</para>
179
180<screen><userinput remap="install">rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a</userinput></screen>
181
182 </sect2>
183
184 <sect2 id="contents-binutils" role="content">
185 <title>Contents of Binutils</title>
186
187 <segmentedlist>
188 <segtitle>Installed programs</segtitle>
189 <segtitle>Installed libraries</segtitle>
190 <segtitle>Installed directory</segtitle>
191
192 <seglistitem>
193 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, ld, ld.bfd, ld.gold, nm,
194 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
195 <seg>libbfd.so, libctf.so, libctf-nobfd.so, and libopcodes.so</seg>
196 <seg>/usr/lib/ldscripts</seg>
197 </seglistitem>
198 </segmentedlist>
199
200 <variablelist>
201 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
202 <?dbfo list-presentation="list"?>
203 <?dbhtml list-presentation="table"?>
204
205 <varlistentry id="addr2line">
206 <term><command>addr2line</command></term>
207 <listitem>
208 <para>Translates program addresses to file names and line numbers;
209 given an address and the name of an executable, it uses the debugging
210 information in the executable to determine which source file and line
211 number are associated with the address</para>
212 <indexterm zone="ch-system-binutils addr2line">
213 <primary sortas="b-addr2line">addr2line</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="ar">
219 <term><command>ar</command></term>
220 <listitem>
221 <para>Creates, modifies, and extracts from archives</para>
222 <indexterm zone="ch-system-binutils ar">
223 <primary sortas="b-ar">ar</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="as">
229 <term><command>as</command></term>
230 <listitem>
231 <para>An assembler that assembles the output of <command>gcc</command>
232 into object files</para>
233 <indexterm zone="ch-system-binutils as">
234 <primary sortas="b-as">as</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="c-filt">
240 <term><command>c++filt</command></term>
241 <listitem>
242 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
243 overloaded functions from clashing</para>
244 <indexterm zone="ch-system-binutils c-filt">
245 <primary sortas="b-c++filt">c++filt</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="dwp">
251 <term><command>dwp</command></term>
252 <listitem>
253 <para>The DWARF packaging utility</para>
254 <indexterm zone="ch-system-binutils dwp">
255 <primary sortas="dwp">dwp</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="elfedit">
261 <term><command>elfedit</command></term>
262 <listitem>
263 <para>Updates the ELF header of ELF files</para>
264 <indexterm zone="ch-system-binutils elfedit">
265 <primary sortas="b-elfedit">elfedit</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="gprof">
271 <term><command>gprof</command></term>
272 <listitem>
273 <para>Displays call graph profile data</para>
274 <indexterm zone="ch-system-binutils gprof">
275 <primary sortas="b-gprof">gprof</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="ld">
281 <term><command>ld</command></term>
282 <listitem>
283 <para>A linker that combines a number of object and archive files
284 into a single file, relocating their data and tying up symbol
285 references</para>
286 <indexterm zone="ch-system-binutils ld">
287 <primary sortas="b-ld">ld</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="ld.gold">
293 <term><command>ld.gold</command></term>
294 <listitem>
295 <para>A cut down version of ld that only supports the
296 elf object file format</para>
297 <indexterm zone="ch-system-binutils ld.gold">
298 <primary sortas="b-ld.gold">ld.gold</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="ld.bfd">
304 <term><command>ld.bfd</command></term>
305 <listitem>
306 <para>Hard link to <command>ld</command></para>
307 <indexterm zone="ch-system-binutils ld.bfd">
308 <primary sortas="b-ld.bfd">ld.bfd</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="nm">
314 <term><command>nm</command></term>
315 <listitem>
316 <para>Lists the symbols occurring in a given object file</para>
317 <indexterm zone="ch-system-binutils nm">
318 <primary sortas="b-nm">nm</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="objcopy">
324 <term><command>objcopy</command></term>
325 <listitem>
326 <para>Translates one type of object file into another</para>
327 <indexterm zone="ch-system-binutils objcopy">
328 <primary sortas="b-objcopy">objcopy</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="objdump">
334 <term><command>objdump</command></term>
335 <listitem>
336 <para>Displays information about the given object file, with options
337 controlling the particular information to display; the information
338 shown is useful to programmers who are working on the compilation
339 tools</para>
340 <indexterm zone="ch-system-binutils objdump">
341 <primary sortas="b-objdump">objdump</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry id="ranlib">
347 <term><command>ranlib</command></term>
348 <listitem>
349 <para>Generates an index of the contents of an archive and stores it
350 in the archive; the index lists all of the symbols defined by archive
351 members that are relocatable object files</para>
352 <indexterm zone="ch-system-binutils ranlib">
353 <primary sortas="b-ranlib">ranlib</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="readelf">
359 <term><command>readelf</command></term>
360 <listitem>
361 <para>Displays information about ELF type binaries</para>
362 <indexterm zone="ch-system-binutils readelf">
363 <primary sortas="b-readelf">readelf</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="size">
369 <term><command>size</command></term>
370 <listitem>
371 <para>Lists the section sizes and the total size for the given
372 object files</para>
373 <indexterm zone="ch-system-binutils size">
374 <primary sortas="b-size">size</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="strings">
380 <term><command>strings</command></term>
381 <listitem>
382 <para>Outputs, for each given file, the sequences of printable
383 characters that are of at least the specified length (defaulting to
384 four); for object files, it prints, by default, only the strings from
385 the initializing and loading sections while for other types of files, it
386 scans the entire file</para>
387 <indexterm zone="ch-system-binutils strings">
388 <primary sortas="b-strings">strings</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
392
393 <varlistentry id="strip">
394 <term><command>strip</command></term>
395 <listitem>
396 <para>Discards symbols from object files</para>
397 <indexterm zone="ch-system-binutils strip">
398 <primary sortas="b-strip">strip</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="libbfd">
404 <term><filename class="libraryfile">libbfd</filename></term>
405 <listitem>
406 <para>The Binary File Descriptor library</para>
407 <indexterm zone="ch-system-binutils libbfd">
408 <primary sortas="c-libbfd">libbfd</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry id="libctf">
414 <term><filename class="libraryfile">libctf</filename></term>
415 <listitem>
416 <para>The Compat ANSI-C Type Format debugging support library</para>
417 <indexterm zone="ch-system-binutils libctf">
418 <primary sortas="c-libctf">libctf</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="libctf-nobfd">
424 <term><filename class="libraryfile">libctf-nobfd</filename></term>
425 <listitem>
426 <para>A libctf variant which does not use libbfd functionality</para>
427 <indexterm zone="ch-system-binutils libctf-nobfd">
428 <primary sortas="c-libctf-nobfd">libctf-nobfd</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
433 <varlistentry id="libopcodes">
434 <term><filename class="libraryfile">libopcodes</filename></term>
435 <listitem>
436 <para>A library for dealing with opcodes&mdash;the <quote>readable
437 text</quote> versions of instructions for the processor;
438 it is used for building utilities like
439 <command>objdump</command></para>
440 <indexterm zone="ch-system-binutils libopcodes">
441 <primary sortas="c-libopcodes">libopcodes</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 </variablelist>
447
448 </sect2>
449
450</sect1>
Note: See TracBrowser for help on using the repository browser.