source: chapter06/binutils.xml@ 9829329

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.3 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 9829329 was 9829329, checked in by Matthew Burgess <matthew@…>, 18 years ago

Remove optimization related warnings from the toolchain packages

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

  • Property mode set to 100644
File size: 9.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 <!ENTITY % patches-entities SYSTEM "../patches.ent">
5 %general-entities;
6 %patches-entities;
7]>
8<sect1 id="ch-system-binutils" role="wrap">
9<title>Binutils-&binutils-version;</title>
10<?dbhtml filename="binutils.html"?>
11
12<indexterm zone="ch-system-binutils"><primary sortas="a-Binutils">Binutils</primary></indexterm>
13
14<sect2 role="package"><title/>
15<para>The Binutils package contains a linker, an assembler, and other tools for
16handling object files.</para>
17
18<segmentedlist>
19<segtitle>&buildtime;</segtitle>
20<segtitle>&diskspace;</segtitle>
21<seglistitem><seg>1.3 SBU</seg><seg>158 MB</seg></seglistitem>
22</segmentedlist>
23
24<segmentedlist>
25<segtitle>&dependencies;</segtitle>
26<seglistitem><seg>Bash, Coreutils, Diffutils, GCC, Gettext,
27Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem>
28</segmentedlist>
29</sect2>
30
31<sect2 role="installation">
32<title>Installation of Binutils</title>
33
34<para>Verify that the PTYs are working properly inside the chroot
35environment. Check that everything is set up correctly by performing a
36simple test:</para>
37
38<screen><userinput>expect -c "spawn ls"</userinput></screen>
39
40<para>If the following message shows up, the chroot environment is not
41set up for proper PTY operation:</para>
42
43<screen><computeroutput>The system has no more ptys.
44Ask your system administrator to create more.</computeroutput></screen>
45
46<para>This issue needs to be resolved before running the test suites
47for Binutils and GCC.</para>
48
49<para>The Binutils documentation recommends building Binutils outside of the
50source directory in a dedicated build directory:</para>
51
52<screen><userinput>mkdir -v ../binutils-build
53cd ../binutils-build</userinput></screen>
54
55<para>Prepare Binutils for compilation:</para>
56
57<screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
58 --enable-shared</userinput></screen>
59
60<para>Compile the package:</para>
61
62<screen><userinput>make tooldir=/usr</userinput></screen>
63
64<para>Normally, the tooldir (the directory where the executables will ultimately
65be located) is set to <filename
66class="directory">$(exec_prefix)/$(target_alias)</filename>. For example, i686
67machines would expand that to <filename
68class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is a custom
69system, this target-specific directory in <filename
70class="directory">/usr</filename> is not required. <filename
71class="directory">$(exec_prefix)/$(target_alias)</filename> would be used if the
72system was used to cross-compile (for example, compiling a package on an Intel
73machine that generates code that can be executed on PowerPC machines).</para>
74
75<important><para>The test suite for Binutils in this section is
76considered critical. Do not skip it under any
77circumstances.</para></important>
78
79<para>Test the results:</para>
80
81<screen><userinput>make check</userinput></screen>
82
83<para>Install the package:</para>
84
85<screen><userinput>make tooldir=/usr install</userinput></screen>
86
87<para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
88some packages:</para>
89
90<screen><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
91
92</sect2>
93
94
95<sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title>
96
97<segmentedlist>
98<segtitle>Installed programs</segtitle>
99<segtitle>Installed libraries</segtitle>
100<seglistitem><seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
101ranlib, readelf, size, strings, and strip</seg>
102<seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg></seglistitem>
103</segmentedlist>
104
105<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
106<?dbfo list-presentation="list"?>
107<?dbhtml list-presentation="table"?>
108
109<varlistentry id="addr2line">
110<term><command>addr2line</command></term>
111<listitem>
112<para>Translates program addresses to file names and line numbers;
113given an address and the name of an executable, it uses the debugging
114information in the executable to determine which source file and line
115number are associated with the address</para>
116<indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm>
117</listitem>
118</varlistentry>
119
120<varlistentry id="ar">
121<term><command>ar</command></term>
122<listitem>
123<para>Creates, modifies, and extracts from archives</para>
124<indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm>
125</listitem>
126</varlistentry>
127
128<varlistentry id="as">
129<term><command>as</command></term>
130<listitem>
131<para>An assembler that assembles the output of <command>gcc</command>
132into object files</para>
133<indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
134</listitem>
135</varlistentry>
136
137<varlistentry id="c-filt">
138<term><command>c++filt</command></term>
139<listitem>
140<para>Used by the linker to de-mangle C++ and Java symbols and to keep
141overloaded functions from clashing</para>
142<indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm>
143</listitem>
144</varlistentry>
145
146<varlistentry id="gprof">
147<term><command>gprof</command></term>
148<listitem>
149<para>Displays call graph profile data</para>
150<indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm>
151</listitem>
152</varlistentry>
153
154<varlistentry id="ld">
155<term><command>ld</command></term>
156<listitem>
157<para>A linker that combines a number of object and archive files into a single file,
158relocating their data and tying up symbol references</para>
159<indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm>
160</listitem>
161</varlistentry>
162
163<varlistentry id="nm">
164<term><command>nm</command></term>
165<listitem>
166<para>Lists the symbols occurring in a given object file</para>
167<indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm>
168</listitem>
169</varlistentry>
170
171<varlistentry id="objcopy">
172<term><command>objcopy</command></term>
173<listitem>
174<para>Translates one type of object file into another</para>
175<indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm>
176</listitem>
177</varlistentry>
178
179<varlistentry id="objdump">
180<term><command>objdump</command></term>
181<listitem>
182<para>Displays information about the given object file, with options
183controlling the particular information to display; the information
184shown is useful to programmers who are working on the compilation
185tools</para>
186<indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm>
187</listitem>
188</varlistentry>
189
190<varlistentry id="ranlib">
191<term><command>ranlib</command></term>
192<listitem>
193<para>Generates an index of the contents of an archive and stores it
194in the archive; the index lists all of the symbols defined by archive
195members that are relocatable object files</para>
196<indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm>
197</listitem>
198</varlistentry>
199
200<varlistentry id="readelf">
201<term><command>readelf</command></term>
202<listitem>
203<para>Displays information about ELF type binaries</para>
204<indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm>
205</listitem>
206</varlistentry>
207
208<varlistentry id="size">
209<term><command>size</command></term>
210<listitem>
211<para>Lists the section sizes and the total size for the given object files</para>
212<indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm>
213</listitem>
214</varlistentry>
215
216<varlistentry id="strings">
217<term><command>strings</command></term>
218<listitem>
219<para>Outputs, for each given file, the sequences of printable
220characters that are of at least the specified length (defaulting to
221four); for object files, it prints, by default, only the strings from
222the initializing and loading sections while for other types of files, it
223scans the entire file</para>
224<indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm>
225</listitem>
226</varlistentry>
227
228<varlistentry id="strip">
229<term><command>strip</command></term>
230<listitem>
231<para>Discards symbols from object files</para>
232<indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm>
233</listitem>
234</varlistentry>
235
236<varlistentry id="libiberty">
237<term><filename class="libraryfile">libiberty</filename></term>
238<listitem>
239<para>Contains routines used by various GNU programs, including
240<command>getopt</command>, <command>obstack</command>,
241<command>strerror</command>, <command>strtol</command>, and
242<command>strtoul</command></para>
243<indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm>
244</listitem>
245</varlistentry>
246
247<varlistentry id="libbfd">
248<term><filename class="libraryfile">libbfd</filename></term>
249<listitem>
250<para>The Binary File Descriptor library</para>
251<indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm>
252</listitem>
253</varlistentry>
254
255<varlistentry id="libopcodes">
256<term><filename class="libraryfile">libopcodes</filename></term>
257<listitem>
258<para>A library for dealing with opcodes&mdash;the <quote>readable
259text</quote> versions of instructions for the processor;
260it is used for building utilities like
261<command>objdump</command>.</para>
262<indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm>
263</listitem>
264</varlistentry>
265</variablelist>
266
267</sect2>
268
269</sect1>
270
Note: See TracBrowser for help on using the repository browser.