source: chapter06/binutils.xml@ 0445a3d

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 6.4 6.5 6.6 6.7 6.8 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 0445a3d was 0445a3d, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added remap attributes to userinput tags in packages pages.

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

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