xref: /freebsd/contrib/elftoolchain/brandelf/brandelf.1 (revision 9fc5c47fa5c7fa58d61245f0408611943e613164)
1.\" Copyright (c) 1997
2.\"	John-Mark Gurney.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the author nor the names of any co-contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS''
17.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD: src/usr.bin/brandelf/brandelf.1,v 1.17 2007/03/09 14:36:18 ru Exp $
29.\" $Id: brandelf.1 3195 2015-05-12 17:22:19Z emaste $
30.\"
31.Dd October 27, 2014
32.Dt BRANDELF 1
33.Os
34.Sh NAME
35.Nm brandelf
36.Nd mark an ELF binary for a specific ABI
37.Sh SYNOPSIS
38.Nm
39.Op Fl V | Fl -version
40.Op Fl f Ar ELF_ABI_number
41.Op Fl h | Fl -help
42.Op Fl l
43.Op Fl t Ar brand
44.Op Fl v
45.Ar
46.Sh DESCRIPTION
47The
48.Nm
49utility marks an ELF binary to be run under a certain ABI.
50.Pp
51The options are as follows:
52.Bl -tag -width indent
53.It Fl f Ar ELF_ABI_number
54Forces branding with the supplied ELF ABI number.
55Incompatible with the
56.Fl t
57option.
58These values are assigned by SCO/USL.
59.It Fl h | Fl -help
60Print a usage message and exit.
61.It Fl l
62Writes the list of all known ELF types to standard output.
63.It Fl t Ar brand
64Brands the given ELF binaries to be of the ABI specified by argument
65.Ar brand .
66Supported ABIs include
67.Dq Li 86Open ,
68.Dq Li AIX ,
69.Dq Li ARM ,
70.Dq Li AROS ,
71.Dq Li FreeBSD ,
72.Dq Li GNU ,
73.Dq Li HP/UX ,
74.Dq Li Hurd ,
75.Dq Li IRIX ,
76.Dq Li Linux
77(an alias for
78.Dq Li GNU ) ,
79.Dq Li Modesto ,
80.Dq Li NSK ,
81.Dq Li NetBSD ,
82.Dq Li None ,
83.Dq Li OpenBSD ,
84.Dq Li OpenVMS ,
85.Dq Li Standalone ,
86.Dq Li SVR4
87(an alias for
88.Dq Li None ) ,
89.Dq Li Solaris
90and
91.Dq Li Tru64 .
92.It Fl v
93This option is accepted for compatibility with other versions of
94.Nm ,
95but is otherwise ignored.
96.It Fl V | Fl -version
97Print a version identifier and exit.
98.El
99.Pp
100If the options
101.Fl f Ar ELF_ABI_number
102or
103.Fl t Ar brand
104were specified,
105.Nm
106will brand the files named by command-line arguments
107.Ar
108to be of type
109.Ar ELF_ABI_number
110or
111.Ar brand
112respectively.
113.Pp
114If neither of the
115.Fl f
116or
117.Fl t
118options were specified,
119.Nm
120will display the current branding for the files named by the arguments
121.Ar .
122.Sh EXIT STATUS
123Exit status is 0 on success, and 1 if the command
124fails if a file does not exist, is too short, fails to brand properly,
125or the brand requested is not one of the known types and the
126.Fl f
127option is not set.
128.Sh EXAMPLES
129The following is an example of a typical usage
130of the
131.Nm
132command:
133.Bd -literal -offset indent
134brandelf file
135brandelf -t GNU file
136.Ed
137.Sh SEE ALSO
138.Rs
139.%A The Santa Cruz Operation, Inc.
140.%T System V Application Binary Interface
141.%D April 29, 1998 (DRAFT)
142.%O http://www.sco.com/developer/devspecs/
143.Re
144.Sh HISTORY
145The
146.Nm
147manual page first appeared in
148.Fx 2.2 .
149.Sh AUTHORS
150This manual page was written by
151.An John-Mark Gurney Aq Mt gurney_j@efn.org .
152