source: chapter06/binutils.xml@ 512c848

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 8.0 8.0-rc1 8.1 8.1-rc1 8.1-rc2 8.2 8.2-rc1 8.3 8.3-rc1 8.3-rc2 8.4 8.4-rc1 9.0 9.0-rc1 9.1 9.1-rc1 cross-chap5 ml-11.0 multilib old-trunk trunk xry111/git-transition xry111/glibc-2.34 xry111/tester-nohack xry111/usr-move
Last change on this file since 512c848 was 512c848, checked in by DJ Lucas <dj@…>, 5 years ago

Update to zlib-1.2.9, fixes #4023. Update to m4-1.4.18, fixes #4022, correct binutils linking with zlib and enable plugins.

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

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