source: chapter06/binutils.xml@ dd30a4b

7.9-systemd 7.9-systemd-rc1 7.9-systemd-rc2 systemd
Last change on this file since dd30a4b was dd30a4b, checked in by DJ Lucas <dj@…>, 6 years ago

Merge from trunk r10991.

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

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