source: chapter06/binutils.xml@ 3aee2ac2

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 3aee2ac2 was 3aee2ac2, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Update to eudev-1.10
Add a sentence about possible make failrues if j > 1 in SBU section.
Add -j1 to acl, attr, and vim tests.
Update kernel options description when building the kernel.

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