source: chapter06/binutils.xml@ 3e005ba

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 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 3e005ba was 3e005ba, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Update to binutils-2.26.1.
Update to linux-4.6.3.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11092 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 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 --disable-werror</userinput></screen>
71
72 <para>Compile the package:</para>
73
74<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
75
76 <variablelist>
77 <title>The meaning of the make parameter:</title>
78
79 <varlistentry>
80 <term><parameter>tooldir=/usr</parameter></term>
81 <listitem>
82 <para>Normally, the tooldir (the directory where the executables will
83 ultimately be located) is set to <filename
84 class="directory">$(exec_prefix)/$(target_alias)</filename>. For
85 example, x86_64 machines would expand that to <filename
86 class="directory">/usr/x86_64-unknown-linux-gnu</filename>. Because this is
87 a custom system, this target-specific directory in <filename
88 class="directory">/usr</filename> is not required. <filename
89 class="directory">$(exec_prefix)/$(target_alias)</filename> would be
90 used if the system was used to cross-compile (for example, compiling a
91 package on an Intel machine that generates code that can be executed
92 on PowerPC machines).</para>
93 </listitem>
94 </varlistentry>
95
96 </variablelist>
97
98 <important>
99 <para>The test suite for Binutils in this section is considered critical.
100 Do not skip it under any circumstances.</para>
101 </important>
102
103 <para>Test the results:</para>
104
105<screen><userinput remap="test">make -k check</userinput></screen>
106
107 <para>The test 'Link with zlib-gabi compressed debug output' is known to fail.</para>
108
109 <para>Install the package:</para>
110
111<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
112
113 </sect2>
114
115 <sect2 id="contents-binutils" role="content">
116 <title>Contents of Binutils</title>
117
118 <segmentedlist>
119 <segtitle>Installed programs</segtitle>
120 <segtitle>Installed libraries</segtitle>
121 <segtitle>Installed directory</segtitle>
122
123 <seglistitem>
124 <seg>addr2line, ar, as, c++filt, elfedit, gprof, ld, ld.bfd, nm,
125 objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
126 <seg>libbfd.{a,so} and libopcodes.{a,so}</seg>
127 <seg>/usr/lib/ldscripts</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="elfedit">
182 <term><command>elfedit</command></term>
183 <listitem>
184 <para>Updates the ELF header of ELF files</para>
185 <indexterm zone="ch-system-binutils elfedit">
186 <primary sortas="b-elfedit">elfedit</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry id="gprof">
192 <term><command>gprof</command></term>
193 <listitem>
194 <para>Displays call graph profile data</para>
195 <indexterm zone="ch-system-binutils gprof">
196 <primary sortas="b-gprof">gprof</primary>
197 </indexterm>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry id="ld">
202 <term><command>ld</command></term>
203 <listitem>
204 <para>A linker that combines a number of object and archive files
205 into a single file, relocating their data and tying up symbol
206 references</para>
207 <indexterm zone="ch-system-binutils ld">
208 <primary sortas="b-ld">ld</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 <varlistentry id="ld.bfd">
214 <term><command>ld.bfd</command></term>
215 <listitem>
216 <para>Hard link to <command>ld</command></para>
217 <indexterm zone="ch-system-binutils ld.bfd">
218 <primary sortas="b-ld.bfd">ld.bfd</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry id="nm">
224 <term><command>nm</command></term>
225 <listitem>
226 <para>Lists the symbols occurring in a given object file</para>
227 <indexterm zone="ch-system-binutils nm">
228 <primary sortas="b-nm">nm</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry id="objcopy">
234 <term><command>objcopy</command></term>
235 <listitem>
236 <para>Translates one type of object file into another</para>
237 <indexterm zone="ch-system-binutils objcopy">
238 <primary sortas="b-objcopy">objcopy</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="objdump">
244 <term><command>objdump</command></term>
245 <listitem>
246 <para>Displays information about the given object file, with options
247 controlling the particular information to display; the information
248 shown is useful to programmers who are working on the compilation
249 tools</para>
250 <indexterm zone="ch-system-binutils objdump">
251 <primary sortas="b-objdump">objdump</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="ranlib">
257 <term><command>ranlib</command></term>
258 <listitem>
259 <para>Generates an index of the contents of an archive and stores it
260 in the archive; the index lists all of the symbols defined by archive
261 members that are relocatable object files</para>
262 <indexterm zone="ch-system-binutils ranlib">
263 <primary sortas="b-ranlib">ranlib</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
267
268 <varlistentry id="readelf">
269 <term><command>readelf</command></term>
270 <listitem>
271 <para>Displays information about ELF type binaries</para>
272 <indexterm zone="ch-system-binutils readelf">
273 <primary sortas="b-readelf">readelf</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 <varlistentry id="size">
279 <term><command>size</command></term>
280 <listitem>
281 <para>Lists the section sizes and the total size for the given
282 object files</para>
283 <indexterm zone="ch-system-binutils size">
284 <primary sortas="b-size">size</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="strings">
290 <term><command>strings</command></term>
291 <listitem>
292 <para>Outputs, for each given file, the sequences of printable
293 characters that are of at least the specified length (defaulting to
294 four); for object files, it prints, by default, only the strings from
295 the initializing and loading sections while for other types of files, it
296 scans the entire file</para>
297 <indexterm zone="ch-system-binutils strings">
298 <primary sortas="b-strings">strings</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="strip">
304 <term><command>strip</command></term>
305 <listitem>
306 <para>Discards symbols from object files</para>
307 <indexterm zone="ch-system-binutils strip">
308 <primary sortas="b-strip">strip</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="libbfd">
314 <term><filename class="libraryfile">libbfd</filename></term>
315 <listitem>
316 <para>The Binary File Descriptor library</para>
317 <indexterm zone="ch-system-binutils libbfd">
318 <primary sortas="c-libbfd">libbfd</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="libopcodes">
324 <term><filename class="libraryfile">libopcodes</filename></term>
325 <listitem>
326 <para>A library for dealing with opcodes&mdash;the <quote>readable
327 text</quote> versions of instructions for the processor;
328 it is used for building utilities like
329 <command>objdump</command></para>
330 <indexterm zone="ch-system-binutils libopcodes">
331 <primary sortas="c-libopcodes">libopcodes</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 </variablelist>
337
338 </sect2>
339
340</sect1>
Note: See TracBrowser for help on using the repository browser.