source: chapter06/binutils.xml@ 8fab03e

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

Merged trunk.

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

  • Property mode set to 100644
File size: 13.1 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>Fix some LTO tests in the test suite:</para>
73
74<screen><userinput remap="pre">patch -Np1 -i ../&binutils-lto-testsuite-patch;</userinput></screen>
75
76 <para>Enable binutils to recognize multiple plugins:</para>
77
78<screen><userinput remap="pre">patch -Np1 -i ../&binutils-multiple-plugins-patch;</userinput></screen>
79
80 <para>The Binutils documentation recommends building Binutils outside of the
81 source directory in a dedicated build directory:</para>
82
83<screen><userinput remap="pre">mkdir -v ../binutils-build
84cd ../binutils-build</userinput></screen>
85
86 <para>Prepare Binutils for compilation:</para>
87
88<screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/usr \
89 --enable-shared \
90 --disable-werror</userinput></screen>
91
92 <para>Compile the package:</para>
93
94<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
95
96 <variablelist>
97 <title>The meaning of the make parameter:</title>
98
99 <varlistentry>
100 <term><parameter>tooldir=/usr</parameter></term>
101 <listitem>
102 <para>Normally, the tooldir (the directory where the executables will
103 ultimately be located) is set to <filename
104 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
105 example, x86_64 machines would expand that to <filename
106 class="directory">/usr/x86_64-unknown-linux-gnu</filename>. Because this is
107 a custom system, this target-specific directory in <filename
108 class="directory">/usr</filename> is not required. <filename
109 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
110 used if the system was used to cross-compile (for example, compiling a
111 package on an Intel machine that generates code that can be executed
112 on PowerPC machines).</para>
113 </listitem>
114 </varlistentry>
115
116 </variablelist>
117
118 <important>
119 <para>The test suite for Binutils in this section is considered critical.
120 Do not skip it under any circumstances.</para>
121 </important>
122
123 <para>Test the results:</para>
124
125<screen><userinput remap="test">make -k check</userinput></screen>
126
127 <para>Install the package:</para>
128
129<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
130
131 </sect2>
132
133 <sect2 id="contents-binutils" role="content">
134 <title>Contents of Binutils</title>
135
136 <segmentedlist>
137 <segtitle>Installed programs</segtitle>
138 <segtitle>Installed libraries</segtitle>
139 <segtitle>Installed directory</segtitle>
140
141 <seglistitem>
142 <seg>addr2line, ar, as, c++filt, elfedit, gprof, ld, ld.bfd, nm,
143 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
144 <seg><!--libiberty.a,--> libbfd.{a,so}, and libopcodes.{a,so}</seg>
145 <seg>/usr/lib/ldscripts</seg>
146 </seglistitem>
147 </segmentedlist>
148
149 <variablelist>
150 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
151 <?dbfo list-presentation="list"?>
152 <?dbhtml list-presentation="table"?>
153
154 <varlistentry id="addr2line">
155 <term><command>addr2line</command></term>
156 <listitem>
157 <para>Translates program addresses to file names and line numbers;
158 given an address and the name of an executable, it uses the debugging
159 information in the executable to determine which source file and line
160 number are associated with the address</para>
161 <indexterm zone="ch-system-binutils addr2line">
162 <primary sortas="b-addr2line">addr2line</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry id="ar">
168 <term><command>ar</command></term>
169 <listitem>
170 <para>Creates, modifies, and extracts from archives</para>
171 <indexterm zone="ch-system-binutils ar">
172 <primary sortas="b-ar">ar</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="as">
178 <term><command>as</command></term>
179 <listitem>
180 <para>An assembler that assembles the output of <command>gcc</command>
181 into object files</para>
182 <indexterm zone="ch-system-binutils as">
183 <primary sortas="b-as">as</primary>
184 </indexterm>
185 </listitem>
186 </varlistentry>
187
188 <varlistentry id="c-filt">
189 <term><command>c++filt</command></term>
190 <listitem>
191 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
192 overloaded functions from clashing</para>
193 <indexterm zone="ch-system-binutils c-filt">
194 <primary sortas="b-c++filt">c++filt</primary>
195 </indexterm>
196 </listitem>
197 </varlistentry>
198
199 <varlistentry id="elfedit">
200 <term><command>elfedit</command></term>
201 <listitem>
202 <para>Updates the ELF header of ELF files</para>
203 <indexterm zone="ch-system-binutils elfedit">
204 <primary sortas="b-elfedit">elfedit</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry>
208
209 <varlistentry id="gprof">
210 <term><command>gprof</command></term>
211 <listitem>
212 <para>Displays call graph profile data</para>
213 <indexterm zone="ch-system-binutils gprof">
214 <primary sortas="b-gprof">gprof</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="ld">
220 <term><command>ld</command></term>
221 <listitem>
222 <para>A linker that combines a number of object and archive files
223 into a single file, relocating their data and tying up symbol
224 references</para>
225 <indexterm zone="ch-system-binutils ld">
226 <primary sortas="b-ld">ld</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="ld.bfd">
232 <term><command>ld.bfd</command></term>
233 <listitem>
234 <para>Hard link to <command>ld</command></para>
235 <indexterm zone="ch-system-binutils ld.bfd">
236 <primary sortas="b-ld.bfd">ld.bfd</primary>
237 </indexterm>
238 </listitem>
239 </varlistentry>
240
241 <varlistentry id="nm">
242 <term><command>nm</command></term>
243 <listitem>
244 <para>Lists the symbols occurring in a given object file</para>
245 <indexterm zone="ch-system-binutils nm">
246 <primary sortas="b-nm">nm</primary>
247 </indexterm>
248 </listitem>
249 </varlistentry>
250
251 <varlistentry id="objcopy">
252 <term><command>objcopy</command></term>
253 <listitem>
254 <para>Translates one type of object file into another</para>
255 <indexterm zone="ch-system-binutils objcopy">
256 <primary sortas="b-objcopy">objcopy</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 <varlistentry id="objdump">
262 <term><command>objdump</command></term>
263 <listitem>
264 <para>Displays information about the given object file, with options
265 controlling the particular information to display; the information
266 shown is useful to programmers who are working on the compilation
267 tools</para>
268 <indexterm zone="ch-system-binutils objdump">
269 <primary sortas="b-objdump">objdump</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="ranlib">
275 <term><command>ranlib</command></term>
276 <listitem>
277 <para>Generates an index of the contents of an archive and stores it
278 in the archive; the index lists all of the symbols defined by archive
279 members that are relocatable object files</para>
280 <indexterm zone="ch-system-binutils ranlib">
281 <primary sortas="b-ranlib">ranlib</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="readelf">
287 <term><command>readelf</command></term>
288 <listitem>
289 <para>Displays information about ELF type binaries</para>
290 <indexterm zone="ch-system-binutils readelf">
291 <primary sortas="b-readelf">readelf</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="size">
297 <term><command>size</command></term>
298 <listitem>
299 <para>Lists the section sizes and the total size for the given
300 object files</para>
301 <indexterm zone="ch-system-binutils size">
302 <primary sortas="b-size">size</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="strings">
308 <term><command>strings</command></term>
309 <listitem>
310 <para>Outputs, for each given file, the sequences of printable
311 characters that are of at least the specified length (defaulting to
312 four); for object files, it prints, by default, only the strings from
313 the initializing and loading sections while for other types of files, it
314 scans the entire file</para>
315 <indexterm zone="ch-system-binutils strings">
316 <primary sortas="b-strings">strings</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="strip">
322 <term><command>strip</command></term>
323 <listitem>
324 <para>Discards symbols from object files</para>
325 <indexterm zone="ch-system-binutils strip">
326 <primary sortas="b-strip">strip</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330<!--
331 <varlistentry id="libiberty">
332 <term><filename class="libraryfile">libiberty</filename></term>
333 <listitem>
334 <para>Contains routines used by various GNU programs, including
335 <command>getopt</command>, <command>obstack</command>,
336 <command>strerror</command>, <command>strtol</command>, and
337 <command>strtoul</command></para>
338 <indexterm zone="ch-system-binutils libiberty">
339 <primary sortas="c-libiberty">libiberty</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343-->
344 <varlistentry id="libbfd">
345 <term><filename class="libraryfile">libbfd</filename></term>
346 <listitem>
347 <para>The Binary File Descriptor library</para>
348 <indexterm zone="ch-system-binutils libbfd">
349 <primary sortas="c-libbfd">libbfd</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry id="libopcodes">
355 <term><filename class="libraryfile">libopcodes</filename></term>
356 <listitem>
357 <para>A library for dealing with opcodes&mdash;the <quote>readable
358 text</quote> versions of instructions for the processor;
359 it is used for building utilities like
360 <command>objdump</command>.</para>
361 <indexterm zone="ch-system-binutils libopcodes">
362 <primary sortas="c-libopcodes">libopcodes</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 </variablelist>
368
369 </sect2>
370
371</sect1>
Note: See TracBrowser for help on using the repository browser.