source: chapter06/binutils.xml@ 1d7af63

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 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 1d7af63 was 1d7af63, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Remove an obsolete comment about a failed test.

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

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