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

sysvinit
Last change on this file since 00529f2 was bcda234, checked in by William Harrington <kb0iic@…>, 9 years ago

Add configure option descriptions for the gold linker.

  • Property mode set to 100644
File size: 12.1 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
[e61fedb]42<!-- Branch update patch area
[3e0fdeb]43 <para os="p1">The following patch contains a number of updates to the
44 &binutils-version; branch by the Binutils developers:</para>
45
46 <screen os="p2"><userinput>patch -Np1 -i ../&binutils-branch_update-patch;</userinput></screen>
[e61fedb]47-->
[3e0fdeb]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" \
[b6831b6]58LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib" \
[40ce7b8]59 ../binutils-&binutils-dir;/configure --prefix=/usr \
[e15ed01d]60 --enable-shared --enable-gold=yes --enable-plugins --enable-threads</userinput></screen>
[3f8be484]61
62 <para os="j">Compile the package:</para>
63
[e1bee3d4]64<screen os="k"><userinput>make tooldir=/usr</userinput></screen>
[3f8be484]65
[51adad9]66<!-- <important os="l">
[e1bee3d4]67 <para>During <command>make tooldir=/usr</command> you may receive the
[3f8be484]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>
[51adad9]74 </important> -->
[3f8be484]75
[44d357b]76 <variablelist os="n">
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
83 will ultimately be located) is set to <filename
84 class="directory">$(exec_prefix)/$(target_alias)</filename>. Because this
85 is a custom system, this target-specific directory in <filename
86 class="directory">/usr</filename> is not required.</para>
87 </listitem>
88 </varlistentry>
89 </variablelist>
[3f8be484]90
91 <important os="o">
[eb21c92]92 <para>Due to Binutils' critical role in a properly functioning system,
93 the CLFS developers strongly recommend running the testsuite.</para>
[3f8be484]94 </important>
95
[936dcb48]96 <para os="p">Test the results:</para>
[f54319a]97
[686839b]98<screen os="q"><userinput remap="test">make check</userinput></screen>
[f54319a]99
[3f8be484]100 <para os="r">Install the package:</para>
101
102<screen os="s"><userinput>make tooldir=/usr install</userinput></screen>
103
104 </sect2>
105
106 <sect2 id="contents-binutils" role="content">
107 <title>Contents of Binutils</title>
108
109 <segmentedlist>
110 <segtitle>Installed programs</segtitle>
111 <segtitle>Installed libraries</segtitle>
[61ad0b7f]112 <segtitle>Installed directory</segtitle>
[3f8be484]113
114 <seglistitem>
[bcda234]115 <seg>addr2line, ar, as, c++filt, elfedit, gprof, ld, ld.bfd, ld.gold,
116 nm, objcopy, objdump, ranlib, readelf, size, strings, strip</seg>
[c2102b28]117 <seg>libbfd.[a,so], libopcodes.[a,so]</seg>
[61ad0b7f]118 <seg>/usr/lib/ldscripts</seg>
[3f8be484]119 </seglistitem>
120 </segmentedlist>
121
122 <variablelist>
123 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
124 <?dbfo list-presentation="list"?>
125 <?dbhtml list-presentation="table"?>
126
127 <varlistentry id="addr2line">
128 <term><command>addr2line</command></term>
129 <listitem>
130 <para>Translates program addresses to file names and line numbers;
131 given an address and the name of an executable, it uses the debugging
132 information in the executable to determine which source file and line
133 number are associated with the address</para>
134 <indexterm zone="ch-system-binutils addr2line">
135 <primary sortas="b-addr2line">addr2line</primary>
136 </indexterm>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry id="ar">
141 <term><command>ar</command></term>
142 <listitem>
143 <para>Creates, modifies, and extracts from archives</para>
144 <indexterm zone="ch-system-binutils ar">
145 <primary sortas="b-ar">ar</primary>
146 </indexterm>
147 </listitem>
148 </varlistentry>
149
150 <varlistentry id="as">
151 <term><command>as</command></term>
152 <listitem>
153 <para>An assembler that assembles the output of <command>gcc</command>
154 into object files</para>
155 <indexterm zone="ch-system-binutils as">
156 <primary sortas="b-as">as</primary>
157 </indexterm>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry id="c-filt">
162 <term><command>c++filt</command></term>
163 <listitem>
164 <para>Used by the linker to de-mangle C++ and Java symbols and to keep
165 overloaded functions from clashing</para>
166 <indexterm zone="ch-system-binutils c-filt">
167 <primary sortas="b-c++filt">c++filt</primary>
168 </indexterm>
169 </listitem>
170 </varlistentry>
171
[2b220db9]172 <varlistentry id="elfedit">
173 <term><command>elfedit</command></term>
174 <listitem>
175 <para>Updates the ELF header of ELF files</para>
176 <indexterm zone="ch-system-binutils elfedit">
177 <primary sortas="b-elfedit">elfedit</primary>
178 </indexterm>
179 </listitem>
180 </varlistentry>
181
[3f8be484]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
[2b220db9]204 <varlistentry id="ld.bfd">
205 <term><command>ld.bfd</command></term>
206 <listitem>
207 <para>Hard link to <command>ld</command></para>
208 <indexterm zone="ch-system-binutils ld.bfd">
209 <primary sortas="b-ld.bfd">ld.bfd</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
[bcda234]214 <varlistentry id="ld.gold">
215 <term><command>ld.gold</command></term>
216 <listitem>
217 <para>A linker designed to be faster than <command>ld</command>,
218 especially for large C++ applications.</para>
219 <indexterm zone="ch-system-binutils ld.gold">
220 <primary sortas="b-ld.gold">ld.gold</primary>
221 </indexterm>
222 </listitem>
223 </varlistentry>
224
[3f8be484]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,
298 it 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.