.\" .\" Copyright (c) 1998 David E. O'Brien .\" .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD: src/usr.bin/objformat/objformat.1,v 1.3.2.4 2002/06/21 15:28:32 charnier Exp $ .\" $DragonFly: src/usr.bin/objformat/objformat.1,v 1.3 2006/02/17 19:39:10 swildner Exp $ .\" .Dd May 23, 2009 .Os .Dt OBJFORMAT 1 .Sh NAME .Nm objformat .Nd reports default binary format and program deflector .Sh SYNOPSIS .Nm .Nm prog .Sh DESCRIPTION If run as .Nm the default object file format is reported. The only supported object file format is .Ar elf . .Pp If invoked by any other name, the path of the .Nm prog that will be executed is determined as follows: .Pp If .Nm prog is a binutil (such as .Xr as 1 and .Xr ld 1 ) , it is expanded to .Pa /usr/libexec//elf/ Ns Nm prog and executed. .Dq defaults to the current binutils version used by .Dx and can be overridden using the .Ev BINUTILSVER environment variable. .Pp If .Nm prog is a compiler (such as .Xr gcc 1 ) , it is expanded to .Pa /usr/libexec// Ns Nm prog and executed. .Dq defaults to the current compiler used by .Dx and can be overridden using the .Ev CCVER environment variable. .Sh ENVIRONMENT .Bl -tag -width OBJFORMAT_PATH .It Ev BINUTILSVER The .Dq component to be used for binutils paths. .It Ev CCVER The .Dq component to be used for compiler paths. .It Ev OBJFORMAT_PATH If .Ev OBJFORMAT_PATH is set, its value is prepended to the path name determined by the .Nm rules. If it is a sequence of colon separated paths, each of .Ev OBJFORMAT_PATH Ap s elements is prepended to the path name until execution succeeds. .El .Sh DIAGNOSTICS The .Nm utility returns with exit code 1 if called with an improper number of arguments, or if .Nm prog could not be executed. .Sh SEE ALSO .Xr file 1 , .Xr getobjformat 3 .Sh HISTORY The .Nm command appeared in .Fx 3.0 . .Sh AUTHORS .An -nosplit The .Nm utility was written by .An Peter Wemm Aq peter@netplex.com.au . This manual page was written by .An David O'Brien Aq obrien@NUXI.com .