xref: /dragonfly/usr.bin/objformat/objformat.1 (revision 3851e4b8)
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.\"
28.Dd November 14, 2015
29.Dt OBJFORMAT 1
30.Os
31.Sh NAME
32.Nm objformat
33.Nd reports default binary format and program deflector
34.Sh SYNOPSIS
35.Nm
36.Nm prog
37.Sh DESCRIPTION
38If run as
39.Nm
40the default object file format is reported.
41The only supported object file format is
42.Ar elf .
43.Pp
44If invoked by any other name, the path of the
45.Nm prog
46that will be executed is determined as follows:
47.Pp
48If
49.Nm prog
50is a binutil (such as
51.Xr as 1
52and
53.Xr ld 1 ) ,
54it is expanded to
55.Pa /usr/libexec/<binutils>/elf/ Ns Nm prog
56and executed.
57.Dq <binutils>
58defaults to the current binutils version used by
59.Dx
60and can be overridden using the
61.Ev BINUTILSVER
62environment variable.
63.Pp
64If
65.Nm prog
66is a compiler (such as
67.Xr gcc 1 ) ,
68it is expanded to
69.Pa /usr/libexec/<ccver>/ Ns Nm prog
70and executed.
71.Dq <ccver>
72defaults to the current compiler used by
73.Dx
74and can be overridden using the
75.Ev CCVER
76environment variable.
77.Sh ENVIRONMENT
78.Bl -tag -width OBJFORMAT_PATH
79.It Ev BINUTILSVER
80The
81.Dq <binutils>
82component to be used for binutils paths.
83.It Ev CCVER
84The
85.Dq <ccver>
86component to be used for compiler paths.
87.It Ev LDVER
88If this variable is defined as
89.Dq ld.bfd
90then the ld command will be an alias for the classic
91.Dq GNU ld
92linker. If it is undefined or any other value, the ld command will
93execute the newer
94.Dq GNU gold
95linker.
96.It Ev OBJFORMAT_PATH
97If
98.Ev OBJFORMAT_PATH
99is set, its value is prepended to the path name determined by the
100.Nm
101rules.
102If it is a sequence of colon separated paths, each of
103.Ev OBJFORMAT_PATH Ap s
104elements is prepended to the path name until execution succeeds.
105.El
106.Sh EXIT STATUS
107The
108.Nm
109utility returns with exit code 1
110if called with an improper number of arguments, or if
111.Nm prog
112could not be executed.
113.Sh SEE ALSO
114.Xr file 1 ,
115.Xr getobjformat 3
116.Sh HISTORY
117The
118.Nm
119command appeared in
120.Fx 3.0 .
121.Sh AUTHORS
122.An -nosplit
123The
124.Nm
125utility was written by
126.An Peter Wemm Aq Mt peter@netplex.com.au .
127This manual page was written by
128.An David O'Brien Aq Mt obrien@NUXI.com .
129