source: chapter06/binutils.xml@ 61d3147

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 61d3147 was 61d3147, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Update to gcc-4.9

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10550 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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