source: chapter06/binutils.xml@ 3ce8d1a

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

Merge r11000 and r11001 from trunk.

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

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