source: chapter06/binutils.xml@ 50420218

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since 50420218 was 50420218, checked in by Matthew Burgess <matthew@…>, 11 years ago

Sync with latest trunk updates

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

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