source: chapter06/binutils.xml@ fe05b08

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.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 fe05b08 was fe05b08, checked in by Bruce Dubbs <bdubbs@…>, 14 years ago

Add installed directories information to
each package. Thanks to Chris Staub for the patch.

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

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