source: chapter06/binutils.xml@ 93ee748

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 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 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 93ee748 was 93ee748, checked in by Matthew Burgess <matthew@…>, 16 years ago

Updated to Texinfo-4.11. Fixes #2074.

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

  • Property mode set to 100644
File size: 11.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. Check that everything is set up correctly by performing a
46 simple test:</para>
47
48<screen><userinput remap="test">expect -c "spawn ls"</userinput></screen>
49
50 <para>If the following message shows up, the chroot environment is not
51 set up for proper PTY operation:</para>
52
53<screen><computeroutput>The system has no more ptys.
54Ask your system administrator to create more.</computeroutput></screen>
55
56 <para>This issue needs to be resolved before running the test suites
57 for Binutils and GCC.</para>
58
59 <para>Binutils does not recognize versions of Texinfo newer than 4.9. Fix
60 this issue by applying the following patch:</para>
61
62<screen><userinput remap="pre">patch -Np1 -i ../&binutils-configure-patch;</userinput></screen>
63
64 <para>The Binutils documentation recommends building Binutils outside of the
65 source directory in a dedicated build directory:</para>
66
67<screen><userinput remap="pre">mkdir -v ../binutils-build
68cd ../binutils-build</userinput></screen>
69
70 <para>Prepare Binutils for compilation:</para>
71
72<screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/usr \
73 --enable-shared</userinput></screen>
74
75 <para>Compile the package:</para>
76
77<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
78
79 <variablelist>
80 <title>The meaning of the make parameter:</title>
81
82 <varlistentry>
83 <term><parameter>tooldir=/usr</parameter></term>
84 <listitem>
85 <para>Normally, the tooldir (the directory where the executables will
86 ultimately be located) is set to <filename
87 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
88 example, i686 machines would expand that to <filename
89 class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is
90 a custom system, this target-specific directory in <filename
91 class="directory">/usr</filename> is not required. <filename
92 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
93 used if the system was used to cross-compile (for example, compiling a
94 package on an Intel machine that generates code that can be executed
95 on PowerPC machines).</para>
96 </listitem>
97 </varlistentry>
98
99 </variablelist>
100
101 <important>
102 <para>The test suite for Binutils in this section is considered critical.
103 Do not skip it under any circumstances.</para>
104 </important>
105
106 <para>Test the results:</para>
107
108<screen><userinput remap="test">make check</userinput></screen>
109
110 <para>Install the package:</para>
111
112<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
113
114 <para>Install the <filename class="headerfile">libiberty</filename> header
115 file that is needed by some packages:</para>
116
117<screen><userinput remap="install">cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
118
119 </sect2>
120
121
122 <sect2 id="contents-binutils" role="content">
123 <title>Contents of Binutils</title>
124
125 <segmentedlist>
126 <segtitle>Installed programs</segtitle>
127 <segtitle>Installed libraries</segtitle>
128
129 <seglistitem>
130 <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
131 ranlib, readelf, size, strings, and strip</seg>
132 <seg>libiberty.a, libbfd.{a,so}, and libopcodes.{a,so}</seg>
133 </seglistitem>
134 </segmentedlist>
135
136 <variablelist>
137 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
138 <?dbfo list-presentation="list"?>
139 <?dbhtml list-presentation="table"?>
140
141 <varlistentry id="addr2line">
142 <term><command>addr2line</command></term>
143 <listitem>
144 <para>Translates program addresses to file names and line numbers;
145 given an address and the name of an executable, it uses the debugging
146 information in the executable to determine which source file and line
147 number are associated with the address</para>
148 <indexterm zone="ch-system-binutils addr2line">
149 <primary sortas="b-addr2line">addr2line</primary>
150 </indexterm>
151 </listitem>
152 </varlistentry>
153
154 <varlistentry id="ar">
155 <term><command>ar</command></term>
156 <listitem>
157 <para>Creates, modifies, and extracts from archives</para>
158 <indexterm zone="ch-system-binutils ar">
159 <primary sortas="b-ar">ar</primary>
160 </indexterm>
161 </listitem>
162 </varlistentry>
163
164 <varlistentry id="as">
165 <term><command>as</command></term>
166 <listitem>
167 <para>An assembler that assembles the output of <command>gcc</command>
168 into object files</para>
169 <indexterm zone="ch-system-binutils as">
170 <primary sortas="b-as">as</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
175 <varlistentry id="c-filt">
176 <term><command>c++filt</command></term>
177 <listitem>
178 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
179 overloaded functions from clashing</para>
180 <indexterm zone="ch-system-binutils c-filt">
181 <primary sortas="b-c++filt">c++filt</primary>
182 </indexterm>
183 </listitem>
184 </varlistentry>
185
186 <varlistentry id="gprof">
187 <term><command>gprof</command></term>
188 <listitem>
189 <para>Displays call graph profile data</para>
190 <indexterm zone="ch-system-binutils gprof">
191 <primary sortas="b-gprof">gprof</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="ld">
197 <term><command>ld</command></term>
198 <listitem>
199 <para>A linker that combines a number of object and archive files
200 into a single file, relocating their data and tying up symbol
201 references</para>
202 <indexterm zone="ch-system-binutils ld">
203 <primary sortas="b-ld">ld</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="nm">
209 <term><command>nm</command></term>
210 <listitem>
211 <para>Lists the symbols occurring in a given object file</para>
212 <indexterm zone="ch-system-binutils nm">
213 <primary sortas="b-nm">nm</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="objcopy">
219 <term><command>objcopy</command></term>
220 <listitem>
221 <para>Translates one type of object file into another</para>
222 <indexterm zone="ch-system-binutils objcopy">
223 <primary sortas="b-objcopy">objcopy</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="objdump">
229 <term><command>objdump</command></term>
230 <listitem>
231 <para>Displays information about the given object file, with options
232 controlling the particular information to display; the information
233 shown is useful to programmers who are working on the compilation
234 tools</para>
235 <indexterm zone="ch-system-binutils objdump">
236 <primary sortas="b-objdump">objdump</primary>
237 </indexterm>
238 </listitem>
239 </varlistentry>
240
241 <varlistentry id="ranlib">
242 <term><command>ranlib</command></term>
243 <listitem>
244 <para>Generates an index of the contents of an archive and stores it
245 in the archive; the index lists all of the symbols defined by archive
246 members that are relocatable object files</para>
247 <indexterm zone="ch-system-binutils ranlib">
248 <primary sortas="b-ranlib">ranlib</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="readelf">
254 <term><command>readelf</command></term>
255 <listitem>
256 <para>Displays information about ELF type binaries</para>
257 <indexterm zone="ch-system-binutils readelf">
258 <primary sortas="b-readelf">readelf</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="size">
264 <term><command>size</command></term>
265 <listitem>
266 <para>Lists the section sizes and the total size for the given
267 object files</para>
268 <indexterm zone="ch-system-binutils size">
269 <primary sortas="b-size">size</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="strings">
275 <term><command>strings</command></term>
276 <listitem>
277 <para>Outputs, for each given file, the sequences of printable
278 characters that are of at least the specified length (defaulting to
279 four); for object files, it prints, by default, only the strings from
280 the initializing and loading sections while for other types of files, it
281 scans the entire file</para>
282 <indexterm zone="ch-system-binutils strings">
283 <primary sortas="b-strings">strings</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="strip">
289 <term><command>strip</command></term>
290 <listitem>
291 <para>Discards symbols from object files</para>
292 <indexterm zone="ch-system-binutils strip">
293 <primary sortas="b-strip">strip</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
298 <varlistentry id="libiberty">
299 <term><filename class="libraryfile">libiberty</filename></term>
300 <listitem>
301 <para>Contains routines used by various GNU programs, including
302 <command>getopt</command>, <command>obstack</command>,
303 <command>strerror</command>, <command>strtol</command>, and
304 <command>strtoul</command></para>
305 <indexterm zone="ch-system-binutils libiberty">
306 <primary sortas="c-libiberty">libiberty</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.