1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- Copyright (C) 1991-2021 Free Software Foundation, Inc.
4
5Permission is granted to copy, distribute and/or modify this document
6under the terms of the GNU Free Documentation License, Version 1.3
7or any later version published by the Free Software Foundation;
8with no Invariant Sections, with no Front-Cover Texts, and with no
9Back-Cover Texts.  A copy of the license is included in the
10section entitled "GNU Free Documentation License".
11 -->
12<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
13<head>
14<title>GNU Binary Utilities: Target Selection</title>
15
16<meta name="description" content="GNU Binary Utilities: Target Selection">
17<meta name="keywords" content="GNU Binary Utilities: Target Selection">
18<meta name="resource-type" content="document">
19<meta name="distribution" content="global">
20<meta name="Generator" content="makeinfo">
21<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
22<link href="index.html#Top" rel="start" title="Top">
23<link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index">
24<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
25<link href="Selecting-the-Target-System.html#Selecting-the-Target-System" rel="up" title="Selecting the Target System">
26<link href="Architecture-Selection.html#Architecture-Selection" rel="next" title="Architecture Selection">
27<link href="Selecting-the-Target-System.html#Selecting-the-Target-System" rel="previous" title="Selecting the Target System">
28<style type="text/css">
29<!--
30a.summary-letter {text-decoration: none}
31blockquote.smallquotation {font-size: smaller}
32div.display {margin-left: 3.2em}
33div.example {margin-left: 3.2em}
34div.indentedblock {margin-left: 3.2em}
35div.lisp {margin-left: 3.2em}
36div.smalldisplay {margin-left: 3.2em}
37div.smallexample {margin-left: 3.2em}
38div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
39div.smalllisp {margin-left: 3.2em}
40kbd {font-style:oblique}
41pre.display {font-family: inherit}
42pre.format {font-family: inherit}
43pre.menu-comment {font-family: serif}
44pre.menu-preformatted {font-family: serif}
45pre.smalldisplay {font-family: inherit; font-size: smaller}
46pre.smallexample {font-size: smaller}
47pre.smallformat {font-family: inherit; font-size: smaller}
48pre.smalllisp {font-size: smaller}
49span.nocodebreak {white-space:nowrap}
50span.nolinebreak {white-space:nowrap}
51span.roman {font-family:serif; font-weight:normal}
52span.sansserif {font-family:sans-serif; font-weight:normal}
53ul.no-bullet {list-style: none}
54-->
55</style>
56
57
58</head>
59
60<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
61<a name="Target-Selection"></a>
62<div class="header">
63<p>
64Next: <a href="Architecture-Selection.html#Architecture-Selection" accesskey="n" rel="next">Architecture Selection</a>, Up: <a href="Selecting-the-Target-System.html#Selecting-the-Target-System" accesskey="u" rel="up">Selecting the Target System</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
65</div>
66<hr>
67<a name="Target-Selection-1"></a>
68<h3 class="section">17.1 Target Selection</h3>
69
70<p>A <em>target</em> is an object file format.  A given target may be
71supported for multiple architectures (see <a href="Architecture-Selection.html#Architecture-Selection">Architecture Selection</a>).
72A target selection may also have variations for different operating
73systems or architectures.
74</p>
75<p>The command to list valid target values is &lsquo;<samp>objdump -i</samp>&rsquo;
76(the first column of output contains the relevant information).
77</p>
78<p>Some sample values are: &lsquo;<samp>a.out-hp300bsd</samp>&rsquo;, &lsquo;<samp>ecoff-littlemips</samp>&rsquo;,
79&lsquo;<samp>a.out-sunos-big</samp>&rsquo;.
80</p>
81<p>You can also specify a target using a configuration triplet.  This is
82the same sort of name that is passed to <samp>configure</samp> to specify a
83target.  When you use a configuration triplet as an argument, it must be
84fully canonicalized.  You can see the canonical version of a triplet by
85running the shell script <samp>config.sub</samp> which is included with the
86sources.
87</p>
88<p>Some sample configuration triplets are: &lsquo;<samp>m68k-hp-bsd</samp>&rsquo;,
89&lsquo;<samp>mips-dec-ultrix</samp>&rsquo;, &lsquo;<samp>sparc-sun-sunos</samp>&rsquo;.
90</p>
91<a name="objdump-Target"></a>
92<h4 class="subheading"><code>objdump</code> Target</h4>
93
94<p>Ways to specify:
95</p>
96<ol>
97<li> command-line option: <samp>-b</samp> or <samp>--target</samp>
98
99</li><li> environment variable <code>GNUTARGET</code>
100
101</li><li> deduced from the input file
102</li></ol>
103
104<a name="objcopy-and-strip-Input-Target"></a>
105<h4 class="subheading"><code>objcopy</code> and <code>strip</code> Input Target</h4>
106
107<p>Ways to specify:
108</p>
109<ol>
110<li> command-line options: <samp>-I</samp> or <samp>--input-target</samp>, or <samp>-F</samp> or <samp>--target</samp>
111
112</li><li> environment variable <code>GNUTARGET</code>
113
114</li><li> deduced from the input file
115</li></ol>
116
117<a name="objcopy-and-strip-Output-Target"></a>
118<h4 class="subheading"><code>objcopy</code> and <code>strip</code> Output Target</h4>
119
120<p>Ways to specify:
121</p>
122<ol>
123<li> command-line options: <samp>-O</samp> or <samp>--output-target</samp>, or <samp>-F</samp> or <samp>--target</samp>
124
125</li><li> the input target (see &ldquo;<code>objcopy</code> and <code>strip</code> Input Target&rdquo; above)
126
127</li><li> environment variable <code>GNUTARGET</code>
128
129</li><li> deduced from the input file
130</li></ol>
131
132<a name="nm_002c-size_002c-and-strings-Target"></a>
133<h4 class="subheading"><code>nm</code>, <code>size</code>, and <code>strings</code> Target</h4>
134
135<p>Ways to specify:
136</p>
137<ol>
138<li> command-line option: <samp>--target</samp>
139
140</li><li> environment variable <code>GNUTARGET</code>
141
142</li><li> deduced from the input file
143</li></ol>
144
145<hr>
146<div class="header">
147<p>
148Next: <a href="Architecture-Selection.html#Architecture-Selection" accesskey="n" rel="next">Architecture Selection</a>, Up: <a href="Selecting-the-Target-System.html#Selecting-the-Target-System" accesskey="u" rel="up">Selecting the Target System</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
149</div>
150
151
152
153</body>
154</html>
155