source: chapter06/binutils.xml@ 13e7d79

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

Fix binutils extracted directory version in binutils
build instructions. This will be reverted at the next upstream release
when the tarball name is again synced with the extracted directory
name.

Fix bootscripts to properly export IN_BOOT variable.

Adjust minimum kernel for the host sysem to 2.6.25
due to a udev requirement.

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

  • Property mode set to 100644
File size: 12.5 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 \ -->
81<screen><userinput remap="configure">../binutils-&binutils-dir;/configure --prefix=/usr \
82 --enable-shared</userinput></screen>
83
84 <para>Compile the package:</para>
85
86<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
87
88 <variablelist>
89 <title>The meaning of the make parameter:</title>
90
91 <varlistentry>
92 <term><parameter>tooldir=/usr</parameter></term>
93 <listitem>
94 <para>Normally, the tooldir (the directory where the executables will
95 ultimately be located) is set to <filename
96 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
97 example, x86_64 machines would expand that to <filename
98 class="directory">/usr/x86_64-unknown-linux-gnu</filename>. Because this is
99 a custom system, this target-specific directory in <filename
100 class="directory">/usr</filename> is not required. <filename
101 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
102 used if the system was used to cross-compile (for example, compiling a
103 package on an Intel machine that generates code that can be executed
104 on PowerPC machines).</para>
105 </listitem>
106 </varlistentry>
107
108 </variablelist>
109
110 <important>
111 <para>The test suite for Binutils in this section is considered critical.
112 Do not skip it under any circumstances.</para>
113 </important>
114
115 <para>Test the results:</para>
116
117<screen><userinput remap="test">make -k check</userinput></screen>
118
119 <para>Install the package:</para>
120
121<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
122
123 <para>Install the <filename class="headerfile">libiberty</filename> header
124 file that is needed by some packages:</para>
125
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, gprof, ld, nm, objcopy, objdump,
141 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="gprof">
198 <term><command>gprof</command></term>
199 <listitem>
200 <para>Displays call graph profile data</para>
201 <indexterm zone="ch-system-binutils gprof">
202 <primary sortas="b-gprof">gprof</primary>
203 </indexterm>
204 </listitem>
205 </varlistentry>
206
207 <varlistentry id="ld">
208 <term><command>ld</command></term>
209 <listitem>
210 <para>A linker that combines a number of object and archive files
211 into a single file, relocating their data and tying up symbol
212 references</para>
213 <indexterm zone="ch-system-binutils ld">
214 <primary sortas="b-ld">ld</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="nm">
220 <term><command>nm</command></term>
221 <listitem>
222 <para>Lists the symbols occurring in a given object file</para>
223 <indexterm zone="ch-system-binutils nm">
224 <primary sortas="b-nm">nm</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 <varlistentry id="objcopy">
230 <term><command>objcopy</command></term>
231 <listitem>
232 <para>Translates one type of object file into another</para>
233 <indexterm zone="ch-system-binutils objcopy">
234 <primary sortas="b-objcopy">objcopy</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="objdump">
240 <term><command>objdump</command></term>
241 <listitem>
242 <para>Displays information about the given object file, with options
243 controlling the particular information to display; the information
244 shown is useful to programmers who are working on the compilation
245 tools</para>
246 <indexterm zone="ch-system-binutils objdump">
247 <primary sortas="b-objdump">objdump</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="ranlib">
253 <term><command>ranlib</command></term>
254 <listitem>
255 <para>Generates an index of the contents of an archive and stores it
256 in the archive; the index lists all of the symbols defined by archive
257 members that are relocatable object files</para>
258 <indexterm zone="ch-system-binutils ranlib">
259 <primary sortas="b-ranlib">ranlib</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="readelf">
265 <term><command>readelf</command></term>
266 <listitem>
267 <para>Displays information about ELF type binaries</para>
268 <indexterm zone="ch-system-binutils readelf">
269 <primary sortas="b-readelf">readelf</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="size">
275 <term><command>size</command></term>
276 <listitem>
277 <para>Lists the section sizes and the total size for the given
278 object files</para>
279 <indexterm zone="ch-system-binutils size">
280 <primary sortas="b-size">size</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="strings">
286 <term><command>strings</command></term>
287 <listitem>
288 <para>Outputs, for each given file, the sequences of printable
289 characters that are of at least the specified length (defaulting to
290 four); for object files, it prints, by default, only the strings from
291 the initializing and loading sections while for other types of files, it
292 scans the entire file</para>
293 <indexterm zone="ch-system-binutils strings">
294 <primary sortas="b-strings">strings</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="strip">
300 <term><command>strip</command></term>
301 <listitem>
302 <para>Discards symbols from object files</para>
303 <indexterm zone="ch-system-binutils strip">
304 <primary sortas="b-strip">strip</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="libiberty">
310 <term><filename class="libraryfile">libiberty</filename></term>
311 <listitem>
312 <para>Contains routines used by various GNU programs, including
313 <command>getopt</command>, <command>obstack</command>,
314 <command>strerror</command>, <command>strtol</command>, and
315 <command>strtoul</command></para>
316 <indexterm zone="ch-system-binutils libiberty">
317 <primary sortas="c-libiberty">libiberty</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="libbfd">
323 <term><filename class="libraryfile">libbfd</filename></term>
324 <listitem>
325 <para>The Binary File Descriptor library</para>
326 <indexterm zone="ch-system-binutils libbfd">
327 <primary sortas="c-libbfd">libbfd</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="libopcodes">
333 <term><filename class="libraryfile">libopcodes</filename></term>
334 <listitem>
335 <para>A library for dealing with opcodes&mdash;the <quote>readable
336 text</quote> versions of instructions for the processor;
337 it is used for building utilities like
338 <command>objdump</command>.</para>
339 <indexterm zone="ch-system-binutils libopcodes">
340 <primary sortas="c-libopcodes">libopcodes</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 </variablelist>
346
347 </sect2>
348
349</sect1>
Note: See TracBrowser for help on using the repository browser.