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 | <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 | &env-target;
|
---|
26 |
|
---|
27 | <sect2 role="installation">
|
---|
28 | <title>Installation of Binutils</title>
|
---|
29 |
|
---|
30 | <para os="p3">The following patch contains a number of updates to the
|
---|
31 | &binutils-version; branch by the Binutils developers:</para>
|
---|
32 |
|
---|
33 | <screen os="p4"><userinput>patch -Np1 -i ../&binutils-branch_update-patch;</userinput></screen>
|
---|
34 |
|
---|
35 | <para os="a">The Binutils documentation recommends building Binutils outside of the
|
---|
36 | source directory in a dedicated build directory:</para>
|
---|
37 |
|
---|
38 | <screen os="b"><userinput>mkdir -v ../binutils-build
|
---|
39 | cd ../binutils-build</userinput></screen>
|
---|
40 |
|
---|
41 | <para os="c">Prepare Binutils for compilation:</para>
|
---|
42 |
|
---|
43 | <screen os="d"><userinput>AR=ar AS=as ../binutils-&binutils-version;/configure --prefix=/usr \
|
---|
44 | --build=${CLFS_HOST} --host=${CLFS_TARGET} \
|
---|
45 | --target=${CLFS_TARGET} --enable-shared</userinput></screen>
|
---|
46 |
|
---|
47 | <para os="e">Compile the package:</para>
|
---|
48 |
|
---|
49 | <screen os="f"><userinput>make configure-host</userinput></screen>
|
---|
50 |
|
---|
51 | <important os="g">
|
---|
52 | <para>During <command>make configure-host</command> you may receive the
|
---|
53 | following error message. It is safe to ignore.</para>
|
---|
54 |
|
---|
55 | <screen><computeroutput>WARNING: `flex' is missing on your system. You should only
|
---|
56 | need it if you modified a `.l' file. You may need the `Flex'
|
---|
57 | package in order for those modifications to take effect. You
|
---|
58 | can get `Flex' from any GNU archive site.</computeroutput></screen>
|
---|
59 | </important>
|
---|
60 |
|
---|
61 | <screen os="h"><userinput>make tooldir=/usr</userinput></screen>
|
---|
62 |
|
---|
63 | <variablelist os="i">
|
---|
64 | <title>The meaning of the make parameter:</title>
|
---|
65 |
|
---|
66 | <varlistentry>
|
---|
67 | <term><parameter>tooldir=/usr</parameter></term>
|
---|
68 | <listitem>
|
---|
69 | <para>Normally, the tooldir (the directory where the executables
|
---|
70 | will ultimately be located) is set to <filename
|
---|
71 | class="directory">$(exec_prefix)/$(target_alias)</filename>. Because this
|
---|
72 | is a custom system, this target-specific directory in <filename
|
---|
73 | class="directory">/usr</filename> is not required.</para>
|
---|
74 | </listitem>
|
---|
75 | </varlistentry>
|
---|
76 | </variablelist>
|
---|
77 |
|
---|
78 | <para os="j">Install the package:</para>
|
---|
79 |
|
---|
80 | <screen os="k"><userinput>make DESTDIR=${CLFS} tooldir=/usr install</userinput></screen>
|
---|
81 |
|
---|
82 | </sect2>
|
---|
83 |
|
---|
84 | <sect2 id="contents-binutils" role="content">
|
---|
85 | <title>Contents of Binutils</title>
|
---|
86 |
|
---|
87 | <segmentedlist>
|
---|
88 | <segtitle>Installed programs</segtitle>
|
---|
89 | <segtitle>Installed libraries</segtitle>
|
---|
90 |
|
---|
91 | <seglistitem>
|
---|
92 | <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
|
---|
93 | ranlib, readelf, size, strings, and strip</seg>
|
---|
94 | <seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg>
|
---|
95 | </seglistitem>
|
---|
96 | </segmentedlist>
|
---|
97 |
|
---|
98 | <variablelist>
|
---|
99 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
100 | <?dbfo list-presentation="list"?>
|
---|
101 | <?dbhtml list-presentation="table"?>
|
---|
102 |
|
---|
103 | <varlistentry id="addr2line">
|
---|
104 | <term><command>addr2line</command></term>
|
---|
105 | <listitem>
|
---|
106 | <para>Translates program addresses to file names and line numbers;
|
---|
107 | given an address and the name of an executable, it uses the debugging
|
---|
108 | information in the executable to determine which source file and line
|
---|
109 | number are associated with the address</para>
|
---|
110 | <indexterm zone="ch-system-binutils addr2line">
|
---|
111 | <primary sortas="b-addr2line">addr2line</primary>
|
---|
112 | </indexterm>
|
---|
113 | </listitem>
|
---|
114 | </varlistentry>
|
---|
115 |
|
---|
116 | <varlistentry id="ar">
|
---|
117 | <term><command>ar</command></term>
|
---|
118 | <listitem>
|
---|
119 | <para>Creates, modifies, and extracts from archives</para>
|
---|
120 | <indexterm zone="ch-system-binutils ar">
|
---|
121 | <primary sortas="b-ar">ar</primary>
|
---|
122 | </indexterm>
|
---|
123 | </listitem>
|
---|
124 | </varlistentry>
|
---|
125 |
|
---|
126 | <varlistentry id="as">
|
---|
127 | <term><command>as</command></term>
|
---|
128 | <listitem>
|
---|
129 | <para>An assembler that assembles the output of <command>gcc</command>
|
---|
130 | into object files</para>
|
---|
131 | <indexterm zone="ch-system-binutils as">
|
---|
132 | <primary sortas="b-as">as</primary>
|
---|
133 | </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
|
---|
141 | overloaded functions from clashing</para>
|
---|
142 | <indexterm zone="ch-system-binutils c-filt">
|
---|
143 | <primary sortas="b-c++filt">c++filt</primary>
|
---|
144 | </indexterm>
|
---|
145 | </listitem>
|
---|
146 | </varlistentry>
|
---|
147 |
|
---|
148 | <varlistentry id="gprof">
|
---|
149 | <term><command>gprof</command></term>
|
---|
150 | <listitem>
|
---|
151 | <para>Displays call graph profile data</para>
|
---|
152 | <indexterm zone="ch-system-binutils gprof">
|
---|
153 | <primary sortas="b-gprof">gprof</primary>
|
---|
154 | </indexterm>
|
---|
155 | </listitem>
|
---|
156 | </varlistentry>
|
---|
157 |
|
---|
158 | <varlistentry id="ld">
|
---|
159 | <term><command>ld</command></term>
|
---|
160 | <listitem>
|
---|
161 | <para>A linker that combines a number of object and archive files
|
---|
162 | into a single file, relocating their data and tying up symbol
|
---|
163 | references</para>
|
---|
164 | <indexterm zone="ch-system-binutils ld">
|
---|
165 | <primary sortas="b-ld">ld</primary>
|
---|
166 | </indexterm>
|
---|
167 | </listitem>
|
---|
168 | </varlistentry>
|
---|
169 |
|
---|
170 | <varlistentry id="nm">
|
---|
171 | <term><command>nm</command></term>
|
---|
172 | <listitem>
|
---|
173 | <para>Lists the symbols occurring in a given object file</para>
|
---|
174 | <indexterm zone="ch-system-binutils nm">
|
---|
175 | <primary sortas="b-nm">nm</primary>
|
---|
176 | </indexterm>
|
---|
177 | </listitem>
|
---|
178 | </varlistentry>
|
---|
179 |
|
---|
180 | <varlistentry id="objcopy">
|
---|
181 | <term><command>objcopy</command></term>
|
---|
182 | <listitem>
|
---|
183 | <para>Translates one type of object file into another</para>
|
---|
184 | <indexterm zone="ch-system-binutils objcopy">
|
---|
185 | <primary sortas="b-objcopy">objcopy</primary>
|
---|
186 | </indexterm>
|
---|
187 | </listitem>
|
---|
188 | </varlistentry>
|
---|
189 |
|
---|
190 | <varlistentry id="objdump">
|
---|
191 | <term><command>objdump</command></term>
|
---|
192 | <listitem>
|
---|
193 | <para>Displays information about the given object file, with options
|
---|
194 | controlling the particular information to display; the information
|
---|
195 | shown is useful to programmers who are working on the compilation
|
---|
196 | tools</para>
|
---|
197 | <indexterm zone="ch-system-binutils objdump">
|
---|
198 | <primary sortas="b-objdump">objdump</primary>
|
---|
199 | </indexterm>
|
---|
200 | </listitem>
|
---|
201 | </varlistentry>
|
---|
202 |
|
---|
203 | <varlistentry id="ranlib">
|
---|
204 | <term><command>ranlib</command></term>
|
---|
205 | <listitem>
|
---|
206 | <para>Generates an index of the contents of an archive and stores it
|
---|
207 | in the archive; the index lists all of the symbols defined by archive
|
---|
208 | members that are relocatable object files</para>
|
---|
209 | <indexterm zone="ch-system-binutils ranlib">
|
---|
210 | <primary sortas="b-ranlib">ranlib</primary>
|
---|
211 | </indexterm>
|
---|
212 | </listitem>
|
---|
213 | </varlistentry>
|
---|
214 |
|
---|
215 | <varlistentry id="readelf">
|
---|
216 | <term><command>readelf</command></term>
|
---|
217 | <listitem>
|
---|
218 | <para>Displays information about ELF type binaries</para>
|
---|
219 | <indexterm zone="ch-system-binutils readelf">
|
---|
220 | <primary sortas="b-readelf">readelf</primary>
|
---|
221 | </indexterm>
|
---|
222 | </listitem>
|
---|
223 | </varlistentry>
|
---|
224 |
|
---|
225 | <varlistentry id="size">
|
---|
226 | <term><command>size</command></term>
|
---|
227 | <listitem>
|
---|
228 | <para>Lists the section sizes and the total size for the given
|
---|
229 | object files</para>
|
---|
230 | <indexterm zone="ch-system-binutils size">
|
---|
231 | <primary sortas="b-size">size</primary>
|
---|
232 | </indexterm>
|
---|
233 | </listitem>
|
---|
234 | </varlistentry>
|
---|
235 |
|
---|
236 | <varlistentry id="strings">
|
---|
237 | <term><command>strings</command></term>
|
---|
238 | <listitem>
|
---|
239 | <para>Outputs, for each given file, the sequences of printable
|
---|
240 | characters that are of at least the specified length (defaulting to
|
---|
241 | four); for object files, it prints, by default, only the strings from
|
---|
242 | the initializing and loading sections while for other types of files,
|
---|
243 | it scans the entire file</para>
|
---|
244 | <indexterm zone="ch-system-binutils strings">
|
---|
245 | <primary sortas="b-strings">strings</primary>
|
---|
246 | </indexterm>
|
---|
247 | </listitem>
|
---|
248 | </varlistentry>
|
---|
249 |
|
---|
250 | <varlistentry id="strip">
|
---|
251 | <term><command>strip</command></term>
|
---|
252 | <listitem>
|
---|
253 | <para>Discards symbols from object files</para>
|
---|
254 | <indexterm zone="ch-system-binutils strip">
|
---|
255 | <primary sortas="b-strip">strip</primary>
|
---|
256 | </indexterm>
|
---|
257 | </listitem>
|
---|
258 | </varlistentry>
|
---|
259 |
|
---|
260 | <varlistentry id="libiberty">
|
---|
261 | <term><filename class="libraryfile">libiberty</filename></term>
|
---|
262 | <listitem>
|
---|
263 | <para>Contains routines used by various GNU programs, including
|
---|
264 | <command>getopt</command>, <command>obstack</command>,
|
---|
265 | <command>strerror</command>, <command>strtol</command>, and
|
---|
266 | <command>strtoul</command></para>
|
---|
267 | <indexterm zone="ch-system-binutils libiberty">
|
---|
268 | <primary sortas="c-libiberty">libiberty</primary>
|
---|
269 | </indexterm>
|
---|
270 | </listitem>
|
---|
271 | </varlistentry>
|
---|
272 |
|
---|
273 | <varlistentry id="libbfd">
|
---|
274 | <term><filename class="libraryfile">libbfd</filename></term>
|
---|
275 | <listitem>
|
---|
276 | <para>The Binary File Descriptor library</para>
|
---|
277 | <indexterm zone="ch-system-binutils libbfd">
|
---|
278 | <primary sortas="c-libbfd">libbfd</primary>
|
---|
279 | </indexterm>
|
---|
280 | </listitem>
|
---|
281 | </varlistentry>
|
---|
282 |
|
---|
283 | <varlistentry id="libopcodes">
|
---|
284 | <term><filename class="libraryfile">libopcodes</filename></term>
|
---|
285 | <listitem>
|
---|
286 | <para>A library for dealing with opcodes—the <quote>readable
|
---|
287 | text</quote> versions of instructions for the processor;
|
---|
288 | it is used for building utilities like
|
---|
289 | <command>objdump</command>.</para>
|
---|
290 | <indexterm zone="ch-system-binutils libopcodes">
|
---|
291 | <primary sortas="c-libopcodes">libopcodes</primary>
|
---|
292 | </indexterm>
|
---|
293 | </listitem>
|
---|
294 | </varlistentry>
|
---|
295 |
|
---|
296 | </variablelist>
|
---|
297 |
|
---|
298 | </sect2>
|
---|
299 |
|
---|
300 | </sect1>
|
---|