source: BOOK/final-system/common/binutils.xml@ d316e1e

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since d316e1e was e124019, checked in by Jim Gifford <clfs@…>, 15 years ago

Added Binutils 2.19.51

  • Property mode set to 100644
File size: 12.0 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]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 <title>Binutils-&binutils-version;</title>
12
13 <indexterm zone="ch-system-binutils">
14 <primary sortas="a-Binutils">Binutils</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Binutils package contains a linker, an assembler, and other
21 tools for handling object files.</para>
22
23 </sect2>
24
25 <sect2 role="installation">
26 <title>Installation of Binutils</title>
27
28 <para os="b">Verify that the PTYs are working properly inside the build
29 environment. Check that everything is set up correctly by performing a
30 simple test:</para>
31
[0f3854e]32<screen os="c" role="nodump"><userinput>expect -c "spawn ls"</userinput></screen>
[3f8be484]33
[9ecbe5a]34 <para os="d">This command should give the following output:</para>
[3f8be484]35
[9ecbe5a]36<screen os="e"><computeroutput>spawn ls</computeroutput></screen>
[3f8be484]37
[9ecbe5a]38 <para os="f">If, instead, it gives a message saying to create more ptys,
39 then the environment is not set up for proper PTY operation. This issue
40 needs to be resolved before running the test suites for Binutils and GCC.</para>
[3f8be484]41
[e124019]42<!--
[c3369870]43 <para os="p1">The following patch contains a number of updates to the
44 &binutils-version; branch by the Binutils developers:</para>
[1c836291]45
[e9edcbd]46<screen os="p2"><userinput>patch -Np1 -i ../&binutils-branch_update-patch;</userinput></screen>
[e124019]47-->
[087231b]48
[3f8be484]49 <para os="g">The Binutils documentation recommends building Binutils outside of the
50 source directory in a dedicated build directory:</para>
51
[94e6142]52<screen os="h"><userinput>mkdir -v ../binutils-build
[3f8be484]53cd ../binutils-build</userinput></screen>
54
55 <para os="i">Prepare Binutils for compilation:</para>
56
[4173cd9]57<screen os="ca"><userinput>CC="gcc -isystem /usr/include" \
58 LDFLAGS="-Wl,-rpath-link,/lib" \
[cef9831]59 ../binutils-&binutils-version;/configure --prefix=/usr \
[3f8be484]60 --enable-shared</userinput></screen>
61
62 <para os="j">Compile the package:</para>
63
64<screen os="k"><userinput>make configure-host</userinput></screen>
65
66 <important os="l">
67 <para>During <command>make configure-host</command> you may receive the
68 following error message. It is safe to ignore.</para>
69
70<screen><computeroutput>WARNING: `flex' is missing on your system. You should only
71need it if you modified a `.l' file. You may need the `Flex'
72package in order for those modifications to take effect. You
73can get `Flex' from any GNU archive site.</computeroutput></screen>
74 </important>
75
76<screen os="m"><userinput>make tooldir=/usr</userinput></screen>
77
[44d357b]78 <variablelist os="n">
79 <title>The meaning of the make parameter:</title>
80
81 <varlistentry>
82 <term><parameter>tooldir=/usr</parameter></term>
83 <listitem>
84 <para>Normally, the tooldir (the directory where the executables
85 will ultimately be located) is set to <filename
86 class="directory">$(exec_prefix)/$(target_alias)</filename>. Because this
87 is a custom system, this target-specific directory in <filename
88 class="directory">/usr</filename> is not required.</para>
89 </listitem>
90 </varlistentry>
91 </variablelist>
[3f8be484]92
93 <important os="o">
[121c48a]94 <para>The test suite for Binutils is considered critical.
95 Do not skip it under any circumstance.</para>
[3f8be484]96 </important>
97
[936dcb48]98 <para os="ts1">In order to run the testsuite correctly, due to a change in
99 Glibc we need to run the following command to prevent an error:</para>
[3f8be484]100
[936dcb48]101<screen os="ts2"><userinput>sed -i 's/getline/_getline/' ../binutils-&binutils-version;/libiberty/testsuite/test-demangle.c</userinput></screen>
[3f8be484]102
[936dcb48]103 <para os="p">Test the results:</para>
[f54319a]104
[936dcb48]105<screen os="q"><userinput>make check</userinput></screen>
[f54319a]106
[3f8be484]107 <para os="r">Install the package:</para>
108
109<screen os="s"><userinput>make tooldir=/usr install</userinput></screen>
110
111 <para os="t">Install the <filename class="headerfile">libiberty</filename> header
112 file that is needed by some packages:</para>
113
[94e6142]114<screen os="u"><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
[3f8be484]115
116 </sect2>
117
118 <sect2 id="contents-binutils" role="content">
119 <title>Contents of Binutils</title>
120
121 <segmentedlist>
122 <segtitle>Installed programs</segtitle>
123 <segtitle>Installed libraries</segtitle>
124
125 <seglistitem>
126 <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
127 ranlib, readelf, size, strings, and strip</seg>
128 <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
129 </seglistitem>
130 </segmentedlist>
131
132 <variablelist>
133 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
134 <?dbfo list-presentation="list"?>
135 <?dbhtml list-presentation="table"?>
136
137 <varlistentry id="addr2line">
138 <term><command>addr2line</command></term>
139 <listitem>
140 <para>Translates program addresses to file names and line numbers;
141 given an address and the name of an executable, it uses the debugging
142 information in the executable to determine which source file and line
143 number are associated with the address</para>
144 <indexterm zone="ch-system-binutils addr2line">
145 <primary sortas="b-addr2line">addr2line</primary>
146 </indexterm>
147 </listitem>
148 </varlistentry>
149
150 <varlistentry id="ar">
151 <term><command>ar</command></term>
152 <listitem>
153 <para>Creates, modifies, and extracts from archives</para>
154 <indexterm zone="ch-system-binutils ar">
155 <primary sortas="b-ar">ar</primary>
156 </indexterm>
157 </listitem>
158 </varlistentry>
159
160 <varlistentry id="as">
161 <term><command>as</command></term>
162 <listitem>
163 <para>An assembler that assembles the output of <command>gcc</command>
164 into object files</para>
165 <indexterm zone="ch-system-binutils as">
166 <primary sortas="b-as">as</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="c-filt">
172 <term><command>c++filt</command></term>
173 <listitem>
174 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
175 overloaded functions from clashing</para>
176 <indexterm zone="ch-system-binutils c-filt">
177 <primary sortas="b-c++filt">c++filt</primary>
178 </indexterm>
179 </listitem>
180 </varlistentry>
181
182 <varlistentry id="gprof">
183 <term><command>gprof</command></term>
184 <listitem>
185 <para>Displays call graph profile data</para>
186 <indexterm zone="ch-system-binutils gprof">
187 <primary sortas="b-gprof">gprof</primary>
188 </indexterm>
189 </listitem>
190 </varlistentry>
191
192 <varlistentry id="ld">
193 <term><command>ld</command></term>
194 <listitem>
195 <para>A linker that combines a number of object and archive files
196 into a single file, relocating their data and tying up symbol
197 references</para>
198 <indexterm zone="ch-system-binutils ld">
199 <primary sortas="b-ld">ld</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="nm">
205 <term><command>nm</command></term>
206 <listitem>
207 <para>Lists the symbols occurring in a given object file</para>
208 <indexterm zone="ch-system-binutils nm">
209 <primary sortas="b-nm">nm</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
214 <varlistentry id="objcopy">
215 <term><command>objcopy</command></term>
216 <listitem>
217 <para>Translates one type of object file into another</para>
218 <indexterm zone="ch-system-binutils objcopy">
219 <primary sortas="b-objcopy">objcopy</primary>
220 </indexterm>
221 </listitem>
222 </varlistentry>
223
224 <varlistentry id="objdump">
225 <term><command>objdump</command></term>
226 <listitem>
227 <para>Displays information about the given object file, with options
228 controlling the particular information to display; the information
229 shown is useful to programmers who are working on the compilation
230 tools</para>
231 <indexterm zone="ch-system-binutils objdump">
232 <primary sortas="b-objdump">objdump</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="ranlib">
238 <term><command>ranlib</command></term>
239 <listitem>
240 <para>Generates an index of the contents of an archive and stores it
241 in the archive; the index lists all of the symbols defined by archive
242 members that are relocatable object files</para>
243 <indexterm zone="ch-system-binutils ranlib">
244 <primary sortas="b-ranlib">ranlib</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="readelf">
250 <term><command>readelf</command></term>
251 <listitem>
252 <para>Displays information about ELF type binaries</para>
253 <indexterm zone="ch-system-binutils readelf">
254 <primary sortas="b-readelf">readelf</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="size">
260 <term><command>size</command></term>
261 <listitem>
262 <para>Lists the section sizes and the total size for the given
263 object files</para>
264 <indexterm zone="ch-system-binutils size">
265 <primary sortas="b-size">size</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="strings">
271 <term><command>strings</command></term>
272 <listitem>
273 <para>Outputs, for each given file, the sequences of printable
274 characters that are of at least the specified length (defaulting to
275 four); for object files, it prints, by default, only the strings from
276 the initializing and loading sections while for other types of files,
277 it scans the entire file</para>
278 <indexterm zone="ch-system-binutils strings">
279 <primary sortas="b-strings">strings</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 <varlistentry id="strip">
285 <term><command>strip</command></term>
286 <listitem>
287 <para>Discards symbols from object files</para>
288 <indexterm zone="ch-system-binutils strip">
289 <primary sortas="b-strip">strip</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry id="libiberty">
295 <term><filename class="libraryfile">libiberty</filename></term>
296 <listitem>
297 <para>Contains routines used by various GNU programs, including
298 <command>getopt</command>, <command>obstack</command>,
299 <command>strerror</command>, <command>strtol</command>, and
300 <command>strtoul</command></para>
301 <indexterm zone="ch-system-binutils libiberty">
302 <primary sortas="c-libiberty">libiberty</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="libbfd">
308 <term><filename class="libraryfile">libbfd</filename></term>
309 <listitem>
310 <para>The Binary File Descriptor library</para>
311 <indexterm zone="ch-system-binutils libbfd">
312 <primary sortas="c-libbfd">libbfd</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 <varlistentry id="libopcodes">
318 <term><filename class="libraryfile">libopcodes</filename></term>
319 <listitem>
320 <para>A library for dealing with opcodes&mdash;the <quote>readable
321 text</quote> versions of instructions for the processor;
322 it is used for building utilities like
323 <command>objdump</command>.</para>
324 <indexterm zone="ch-system-binutils libopcodes">
325 <primary sortas="c-libopcodes">libopcodes</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 </variablelist>
331
332 </sect2>
333
334</sect1>
Note: See TracBrowser for help on using the repository browser.