source: chapter08/binutils.xml@ 1dbc435

12.1 12.1-rc1 multilib trunk xry111/arm64 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.1 xry111/mips64el xry111/update-glibc
Last change on this file since 1dbc435 was f0b518a, checked in by Xi Ruoyao <xry111@…>, 10 months ago

binutils: Remove libgprofng.a, add libgprofng.so into contents section

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