xref: /netbsd-src/usr.bin/elf2aout/elf2aout.1 (revision 59e8d36e8f6e5b850fb8ed2a603eead07c09f781)
1.\"	$NetBSD: elf2aout.1,v 1.11 2019/05/18 21:16:12 christos Exp $
2.\"
3.\" Copyright 1996 The Board of Trustees of The Leland Stanford
4.\" Junior University. All Rights Reserved.
5.\"
6.\" Author: Jonathan Stone
7.\"
8.\" Permission to use, copy, modify, and distribute this
9.\" software and its documentation for any purpose and without
10.\" fee is hereby granted, provided that the above copyright
11.\" notice and the above authorship notice appear in all copies.
12.\" Stanford University makes no representations about the suitability
13.\" of this software for any purpose.  It is provided "as is" without
14.\" express or implied warranty.
15.Dd September 30, 1996
16.Dt ELF2AOUT 1
17.Os
18.Sh NAME
19.Nm elf2aout
20.Nd convert a NetBSD ELF-format executable to NetBSD a.out format
21.Sh SYNOPSIS
22.Nm
23.Op Fl \&Os
24.Ar elf-file
25.Ar aout-file
26.Sh DESCRIPTION
27Reads a fully-linked ELF executable (such as a  linked kernel)
28and produces an equivalent a.out format executable file.
29.Pp
30The
31.Nm
32utility is used to convert native
33.Nx
34ELF binaries
35to a.out format, for compatibility with bootblocks and kernel-reading
36utilities like
37.Xr kvm 3 ,
38which currently expect an a.out format kernel.
39.Pp
40The following options are available:
41.Bl -tag -width flag
42.It Fl O
43Produce
44.Dv OMAGIC
45instead of
46.Dv ZMAGIC
47binaries which is the default.
48.It Fl s
49Preserve the symbol table.
50.El
51.\" .Sh DIAGNOSTICS
52.Sh SEE ALSO
53.Xr elf2ecoff 1 ,
54.Xr ld 1 ,
55.Xr kvm 3 ,
56.Xr a.out 5 ,
57.Xr elf 5
58.Sh HISTORY
59.Nm
60was originally developed for
61.Nx Ns Tn /pmax
62by Ted Lemon
63and was first distributed with the pmax port of
64.Nx 1.1 .
65.Sh BUGS
66.Nm
67assumes there are no multiply-referenced symbols in the input ELF symbol
68section.
69It may be necessary to link with
70.Fl x
71to avoid such duplicate symbols.
72.Pp
73In some environments, the GNU binutils
74.Xr objcopy 1
75utility may be a better solution than
76.Nm .
77