Merge branch 'master' of /home/aggelos/devel/dfly/dfly.git/
[dragonfly.git] / usr.bin / objformat / objformat.1
1 .\"
2 .\" Copyright (c) 1998 David E. O'Brien
3 .\"
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD: src/usr.bin/objformat/objformat.1,v 1.3.2.4 2002/06/21 15:28:32 charnier Exp $
27 .\" $DragonFly: src/usr.bin/objformat/objformat.1,v 1.3 2006/02/17 19:39:10 swildner Exp $
28 .\"
29 .Dd May 23, 2009
30 .Os
31 .Dt OBJFORMAT 1
32 .Sh NAME
33 .Nm objformat
34 .Nd reports default binary format and program deflector
35 .Sh SYNOPSIS
36 .Nm
37 .Nm prog
38 .Sh DESCRIPTION
39 If run as
40 .Nm
41 the default object file format is reported.
42 The only supported object file format is
43 .Ar elf .
44 .Pp
45 If invoked by any other name, the path of the
46 .Nm prog
47 that will be executed is determined as follows:
48 .Pp
49 If
50 .Nm prog
51 is a binutil (such as
52 .Xr as 1
53 and
54 .Xr ld 1 ) ,
55 it is expanded to
56 .Pa /usr/libexec/<binutils>/elf/ Ns Nm prog
57 and executed.
58 .Dq <binutils>
59 defaults to the current binutils version used by
60 .Dx
61 and can be overridden using the
62 .Ev BINUTILSVER
63 environment variable.
64 .Pp
65 If
66 .Nm prog
67 is a compiler (such as
68 .Xr gcc 1 ) ,
69 it is expanded to
70 .Pa /usr/libexec/<ccver>/ Ns Nm prog
71 and executed.
72 .Dq <ccver>
73 defaults to the current compiler used by
74 .Dx
75 and can be overridden using the
76 .Ev CCVER
77 environment variable.
78 .Sh ENVIRONMENT
79 .Bl -tag -width OBJFORMAT_PATH
80 .It Ev BINUTILSVER
81 The
82 .Dq <binutils>
83 component to be used for binutils paths.
84 .It Ev CCVER
85 The
86 .Dq <ccver>
87 component to be used for compiler paths.
88 .It Ev OBJFORMAT_PATH
89 If
90 .Ev OBJFORMAT_PATH
91 is set, its value is prepended to the path name determined by the
92 .Nm
93 rules.
94 If it is a sequence of colon separated paths, each of
95 .Ev OBJFORMAT_PATH Ap s
96 elements is prepended to the path name until execution succeeds.
97 .El
98 .Sh DIAGNOSTICS
99 The
100 .Nm
101 utility returns with exit code 1
102 if called with an improper number of arguments, or if
103 .Nm prog
104 could not be executed.
105 .Sh SEE ALSO
106 .Xr file 1 ,
107 .Xr getobjformat 3
108 .Sh HISTORY
109 The
110 .Nm
111 command appeared in
112 .Fx 3.0 .
113 .Sh AUTHORS
114 .An -nosplit
115 The
116 .Nm
117 utility was written by
118 .An Peter Wemm Aq peter@netplex.com.au .
119 This manual page was written by
120 .An David O'Brien Aq obrien@NUXI.com .