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