source: chapter08/binutils.xml@ a11cbb1

xry111/mips64el
Last change on this file since a11cbb1 was a11cbb1, checked in by Xi Ruoyao <xry111@…>, 7 months ago

mips64el: binutils: Do not --enable-gold

MIPS does not support DT_GNU_HASH and DT_MIPS_XHASH is used instead with
--enable-default-hash-style=gnu. But gold does not support DT_MIPS_XHASH
so it will be completely useless and produce many test failures. Just
disable it.

  • Property mode set to 100644
File size: 14.7 KB
RevLine 
[7152faa]1<?xml version="1.0" encoding="UTF-8"?>
[b06ca36]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[673b0d8]4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
[92474b45]7
[81fd230]8<sect1 id="ch-system-binutils" role="wrap">
[92474b45]9 <?dbhtml filename="binutils.html"?>
10
[e747759]11 <sect1info condition="script">
12 <productname>binutils</productname>
13 <productnumber>&binutils-version;</productnumber>
14 <address>&binutils-url;</address>
15 </sect1info>
16
[92474b45]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/>
[673b0d8]25
[92474b45]26 <para>The Binutils package contains a linker, an assembler, and other
27 tools for handling object files.</para>
[6370fa6]28
[92474b45]29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
[5888299]32
[92474b45]33 <seglistitem>
[fb386e0]34 <seg>&binutils-fin-sbu;</seg>
35 <seg>&binutils-fin-du;</seg>
[92474b45]36 </seglistitem>
37 </segmentedlist>
[a001133]38
[92474b45]39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Binutils</title>
43
[d672ab7]44 <para>The Binutils documentation recommends building Binutils
[f1dd547]45 in a dedicated build directory:</para>
[73aedd1d]46
[f1dd547]47<screen><userinput remap="pre">mkdir -v build
48cd build</userinput></screen>
[73aedd1d]49
[92474b45]50 <para>Prepare Binutils for compilation:</para>
[73aedd1d]51
[e123025]52<screen><userinput remap="configure">../configure --prefix=/usr \
[1b11115]53 --sysconfdir=/etc \
[e123025]54 --enable-ld=default \
55 --enable-plugins \
56 --enable-shared \
57 --disable-werror \
[869b0966]58 --enable-64-bit-bfd \
[6fec3f5]59 --with-system-zlib \
60 --enable-default-hash-style=gnu</userinput></screen>
61
[512c848]62 <variablelist>
[6fec3f5]63 <title>The meaning of the new configure parameters:</title>
[512c848]64
[e123025]65 <varlistentry>
66 <term><parameter>--enable-ld=default</parameter></term>
67 <listitem>
[5609769]68 <para>Build the original bfd linker and install it as both ld (the
[e123025]69 default linker) and ld.bfd.</para>
70 </listitem>
71 </varlistentry>
72
[512c848]73 <varlistentry>
74 <term><parameter>--enable-plugins</parameter></term>
75 <listitem>
76 <para>Enables plugin support for the linker.</para>
77 </listitem>
78 </varlistentry>
[869b0966]79
[512c848]80 <varlistentry>
81 <term><parameter>--with-system-zlib</parameter></term>
82 <listitem>
[651f491]83 <para>Use the installed zlib library instead of building the
[512c848]84 included version.</para>
85 </listitem>
86 </varlistentry>
87
88 </variablelist>
[73aedd1d]89
[92474b45]90 <para>Compile the package:</para>
[73aedd1d]91
[0445a3d]92<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
[73aedd1d]93
[92474b45]94 <variablelist>
95 <title>The meaning of the make parameter:</title>
96
97 <varlistentry>
98 <term><parameter>tooldir=/usr</parameter></term>
99 <listitem>
100 <para>Normally, the tooldir (the directory where the executables will
101 ultimately be located) is set to <filename
102 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
[6e88633]103 example, x86_64 machines would expand that to <filename
[1f28ed12]104 class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
[92474b45]105 a custom system, this target-specific directory in <filename
106 class="directory">/usr</filename> is not required. <filename
107 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
[651f491]108 used if the system were used to cross-compile (for example, compiling a
[92474b45]109 package on an Intel machine that generates code that can be executed
110 on PowerPC machines).</para>
111 </listitem>
112 </varlistentry>
113
114 </variablelist>
115
116 <important>
117 <para>The test suite for Binutils in this section is considered critical.
118 Do not skip it under any circumstances.</para>
119 </important>
120
121 <para>Test the results:</para>
[81fd230]122
[42130d6]123<screen><userinput remap="test">make -k check</userinput></screen>
[075d35fb]124
[ceb61b9]125 <para>For a list of failed tests, run:</para>
126
127<screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen>
128
[cdf280e]129 <!-- <para>Three tests in the gprofng suite are also known to fail.</para>-->
[be5b2e0]130
[92474b45]131 <para>Install the package:</para>
[73aedd1d]132
[bca4876]133<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
[73aedd1d]134
[8ada78d]135 <para>Remove useless static libraries:</para>
[cd152f22]136
[f0b518a]137<screen><userinput remap="install">rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a</userinput></screen>
[cd152f22]138
[92474b45]139 </sect2>
140
141 <sect2 id="contents-binutils" role="content">
142 <title>Contents of Binutils</title>
143
144 <segmentedlist>
145 <segtitle>Installed programs</segtitle>
146 <segtitle>Installed libraries</segtitle>
[fe05b08]147 <segtitle>Installed directory</segtitle>
[92474b45]148
149 <seglistitem>
[a11cbb1]150 <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, gprofng, ld, ld.bfd, nm,
[3119ddc]151 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
[f0b518a]152 <seg>libbfd.so, libctf.so, libctf-nobfd.so, libgprofng.so,
153 libopcodes.so, and libsframe.so</seg>
[fe05b08]154 <seg>/usr/lib/ldscripts</seg>
[92474b45]155 </seglistitem>
156 </segmentedlist>
157
158 <variablelist>
159 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
160 <?dbfo list-presentation="list"?>
161 <?dbhtml list-presentation="table"?>
162
163 <varlistentry id="addr2line">
164 <term><command>addr2line</command></term>
165 <listitem>
166 <para>Translates program addresses to file names and line numbers;
167 given an address and the name of an executable, it uses the debugging
168 information in the executable to determine which source file and line
169 number are associated with the address</para>
170 <indexterm zone="ch-system-binutils addr2line">
171 <primary sortas="b-addr2line">addr2line</primary>
172 </indexterm>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry id="ar">
177 <term><command>ar</command></term>
178 <listitem>
179 <para>Creates, modifies, and extracts from archives</para>
180 <indexterm zone="ch-system-binutils ar">
181 <primary sortas="b-ar">ar</primary>
182 </indexterm>
183 </listitem>
184 </varlistentry>
185
186 <varlistentry id="as">
187 <term><command>as</command></term>
188 <listitem>
189 <para>An assembler that assembles the output of <command>gcc</command>
190 into object files</para>
191 <indexterm zone="ch-system-binutils as">
192 <primary sortas="b-as">as</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry id="c-filt">
198 <term><command>c++filt</command></term>
199 <listitem>
200 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
201 overloaded functions from clashing</para>
202 <indexterm zone="ch-system-binutils c-filt">
203 <primary sortas="b-c++filt">c++filt</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
[78cc3be]208 <varlistentry id="dwp">
209 <term><command>dwp</command></term>
210 <listitem>
211 <para>The DWARF packaging utility</para>
212 <indexterm zone="ch-system-binutils dwp">
213 <primary sortas="dwp">dwp</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
[3119ddc]218 <varlistentry id="elfedit">
219 <term><command>elfedit</command></term>
220 <listitem>
[651f491]221 <para>Updates the ELF headers of ELF files</para>
[3119ddc]222 <indexterm zone="ch-system-binutils elfedit">
223 <primary sortas="b-elfedit">elfedit</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
[92474b45]228 <varlistentry id="gprof">
229 <term><command>gprof</command></term>
230 <listitem>
231 <para>Displays call graph profile data</para>
232 <indexterm zone="ch-system-binutils gprof">
233 <primary sortas="b-gprof">gprof</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
[8a687fa]238 <varlistentry id="gprofng">
239 <term><command>gprofng</command></term>
240 <listitem>
[651f491]241 <para>Gathers and analyzes performance data</para>
[8a687fa]242 <indexterm zone="ch-system-binutils gprofng">
243 <primary sortas="b-gprofng">gprofng</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
[92474b45]248 <varlistentry id="ld">
249 <term><command>ld</command></term>
250 <listitem>
251 <para>A linker that combines a number of object and archive files
252 into a single file, relocating their data and tying up symbol
253 references</para>
254 <indexterm zone="ch-system-binutils ld">
255 <primary sortas="b-ld">ld</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
[3119ddc]260 <varlistentry id="ld.bfd">
261 <term><command>ld.bfd</command></term>
262 <listitem>
[651f491]263 <para>A hard link to <command>ld</command></para>
[3119ddc]264 <indexterm zone="ch-system-binutils ld.bfd">
265 <primary sortas="b-ld.bfd">ld.bfd</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
[92474b45]270 <varlistentry id="nm">
271 <term><command>nm</command></term>
272 <listitem>
273 <para>Lists the symbols occurring in a given object file</para>
274 <indexterm zone="ch-system-binutils nm">
275 <primary sortas="b-nm">nm</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="objcopy">
281 <term><command>objcopy</command></term>
282 <listitem>
283 <para>Translates one type of object file into another</para>
284 <indexterm zone="ch-system-binutils objcopy">
285 <primary sortas="b-objcopy">objcopy</primary>
286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="objdump">
291 <term><command>objdump</command></term>
292 <listitem>
293 <para>Displays information about the given object file, with options
294 controlling the particular information to display; the information
295 shown is useful to programmers who are working on the compilation
296 tools</para>
297 <indexterm zone="ch-system-binutils objdump">
298 <primary sortas="b-objdump">objdump</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="ranlib">
304 <term><command>ranlib</command></term>
305 <listitem>
306 <para>Generates an index of the contents of an archive and stores it
307 in the archive; the index lists all of the symbols defined by archive
308 members that are relocatable object files</para>
309 <indexterm zone="ch-system-binutils ranlib">
310 <primary sortas="b-ranlib">ranlib</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="readelf">
316 <term><command>readelf</command></term>
317 <listitem>
318 <para>Displays information about ELF type binaries</para>
319 <indexterm zone="ch-system-binutils readelf">
320 <primary sortas="b-readelf">readelf</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="size">
326 <term><command>size</command></term>
327 <listitem>
328 <para>Lists the section sizes and the total size for the given
329 object files</para>
330 <indexterm zone="ch-system-binutils size">
331 <primary sortas="b-size">size</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 <varlistentry id="strings">
337 <term><command>strings</command></term>
338 <listitem>
339 <para>Outputs, for each given file, the sequences of printable
340 characters that are of at least the specified length (defaulting to
341 four); for object files, it prints, by default, only the strings from
342 the initializing and loading sections while for other types of files, it
343 scans the entire file</para>
344 <indexterm zone="ch-system-binutils strings">
345 <primary sortas="b-strings">strings</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="strip">
351 <term><command>strip</command></term>
352 <listitem>
353 <para>Discards symbols from object files</para>
354 <indexterm zone="ch-system-binutils strip">
355 <primary sortas="b-strip">strip</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
[7bb9fda]359
[92474b45]360 <varlistentry id="libbfd">
361 <term><filename class="libraryfile">libbfd</filename></term>
362 <listitem>
363 <para>The Binary File Descriptor library</para>
364 <indexterm zone="ch-system-binutils libbfd">
365 <primary sortas="c-libbfd">libbfd</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
[90af5870]370 <varlistentry id="libctf">
371 <term><filename class="libraryfile">libctf</filename></term>
372 <listitem>
373 <para>The Compat ANSI-C Type Format debugging support library</para>
374 <indexterm zone="ch-system-binutils libctf">
375 <primary sortas="c-libctf">libctf</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="libctf-nobfd">
381 <term><filename class="libraryfile">libctf-nobfd</filename></term>
382 <listitem>
383 <para>A libctf variant which does not use libbfd functionality</para>
384 <indexterm zone="ch-system-binutils libctf-nobfd">
385 <primary sortas="c-libctf-nobfd">libctf-nobfd</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
[f0b518a]389
390 <varlistentry id="libgprofng">
391 <term><filename class="libraryfile">libgprofng</filename></term>
392 <listitem>
393 <para>A library containing most routines used by
394 <command>gprofng</command></para>
395 <indexterm zone="ch-system-binutils libgprofng">
396 <primary sortas="c-libgprofng">libgprofng</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
[90af5870]400
[92474b45]401 <varlistentry id="libopcodes">
402 <term><filename class="libraryfile">libopcodes</filename></term>
403 <listitem>
404 <para>A library for dealing with opcodes&mdash;the <quote>readable
405 text</quote> versions of instructions for the processor;
406 it is used for building utilities like
[afba93b]407 <command>objdump</command></para>
[92474b45]408 <indexterm zone="ch-system-binutils libopcodes">
409 <primary sortas="c-libopcodes">libopcodes</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
[3b6f5e2]414 <varlistentry id="libsframe">
415 <term><filename class="libraryfile">libsframe</filename></term>
416 <listitem>
417 <para>A library to support online backtracing using a
[ea0bc1e]418 simple unwinder</para>
[3b6f5e2]419 <indexterm zone="ch-system-binutils libsframe">
420 <primary sortas="c-libsframe">libsframe</primary>
421 </indexterm>
422 </listitem>
423 </varlistentry>
424
[92474b45]425 </variablelist>
426
427 </sect2>
[673b0d8]428
429</sect1>
Note: See TracBrowser for help on using the repository browser.