source: chapter06/binutils.xml@ 3119ddc

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.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 3119ddc was 3119ddc, checked in by Matthew Burgess <matthew@…>, 12 years ago

Update list of installed files in a number of packages. Fixes #2979.

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