2019-05-19 00:16:12 +03:00
|
|
|
.\" $NetBSD: elf2aout.1,v 1.11 2019/05/18 21:16:12 christos Exp $
|
1998-01-09 11:03:16 +03:00
|
|
|
.\"
|
1996-09-30 01:53:11 +04:00
|
|
|
.\" Copyright 1996 The Board of Trustees of The Leland Stanford
|
|
|
|
.\" Junior University. All Rights Reserved.
|
|
|
|
.\"
|
|
|
|
.\" Author: Jonathan Stone
|
|
|
|
.\"
|
|
|
|
.\" Permission to use, copy, modify, and distribute this
|
|
|
|
.\" software and its documentation for any purpose and without
|
|
|
|
.\" fee is hereby granted, provided that the above copyright
|
|
|
|
.\" notice and the above authorship notice appear in all copies.
|
|
|
|
.\" Stanford University makes no representations about the suitability
|
|
|
|
.\" of this software for any purpose. It is provided "as is" without
|
|
|
|
.\" express or implied warranty.
|
|
|
|
.Dd September 30, 1996
|
|
|
|
.Dt ELF2AOUT 1
|
1999-03-22 21:16:34 +03:00
|
|
|
.Os
|
1996-09-30 01:53:11 +04:00
|
|
|
.Sh NAME
|
|
|
|
.Nm elf2aout
|
|
|
|
.Nd convert a NetBSD ELF-format executable to NetBSD a.out format
|
|
|
|
.Sh SYNOPSIS
|
2019-05-19 00:16:12 +03:00
|
|
|
.Nm
|
|
|
|
.Op Fl \&Os
|
1997-10-18 17:48:35 +04:00
|
|
|
.Ar elf-file
|
|
|
|
.Ar aout-file
|
1996-09-30 01:53:11 +04:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
Reads a fully-linked ELF executable (such as a linked kernel)
|
|
|
|
and produces an equivalent a.out format executable file.
|
|
|
|
.Pp
|
|
|
|
The
|
1997-10-18 17:48:35 +04:00
|
|
|
.Nm
|
1998-02-06 08:54:12 +03:00
|
|
|
utility is used to convert native
|
|
|
|
.Nx
|
|
|
|
ELF binaries
|
1996-09-30 01:53:11 +04:00
|
|
|
to a.out format, for compatibility with bootblocks and kernel-reading
|
|
|
|
utilities like
|
2012-03-05 14:57:18 +04:00
|
|
|
.Xr kvm 3 ,
|
1996-09-30 01:53:11 +04:00
|
|
|
which currently expect an a.out format kernel.
|
2019-05-19 00:16:12 +03:00
|
|
|
.Pp
|
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width flag
|
|
|
|
.It Fl O
|
|
|
|
Produce
|
|
|
|
.Dv OMAGIC
|
|
|
|
instead of
|
|
|
|
.Dv ZMAGIC
|
|
|
|
binaries which is the default.
|
|
|
|
.It Fl s
|
|
|
|
Preserve the symbol table.
|
|
|
|
.El
|
1996-09-30 01:53:11 +04:00
|
|
|
.\" .Sh DIAGNOSTICS
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr elf2ecoff 1 ,
|
|
|
|
.Xr ld 1 ,
|
2001-12-01 22:05:04 +03:00
|
|
|
.Xr kvm 3 ,
|
1996-09-30 01:53:11 +04:00
|
|
|
.Xr a.out 5 ,
|
2012-03-05 14:57:18 +04:00
|
|
|
.Xr elf 5
|
2001-12-01 22:05:04 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
.Nm
|
|
|
|
was originally developed for
|
|
|
|
.Nx Ns Tn /pmax
|
|
|
|
by Ted Lemon
|
|
|
|
and was first distributed with the pmax port of
|
|
|
|
.Nx 1.1 .
|
1996-09-30 01:53:11 +04:00
|
|
|
.Sh BUGS
|
1997-10-18 17:48:35 +04:00
|
|
|
.Nm
|
1996-09-30 01:53:11 +04:00
|
|
|
assumes there are no multiply-referenced symbols in the input ELF symbol
|
2002-09-30 15:08:56 +04:00
|
|
|
section.
|
|
|
|
It may be necessary to link with
|
1997-10-18 17:48:35 +04:00
|
|
|
.Fl x
|
1996-09-30 01:53:11 +04:00
|
|
|
to avoid such duplicate symbols.
|
|
|
|
.Pp
|
|
|
|
In some environments, the GNU binutils
|
1997-10-18 17:48:35 +04:00
|
|
|
.Xr objcopy 1
|
1996-09-30 01:53:11 +04:00
|
|
|
utility may be a better solution than
|
2003-02-25 13:34:36 +03:00
|
|
|
.Nm .
|