.\" $MirOS: src/usr.bin/elf2aout/elf2aout.1,v 1.5 2006/08/11 00:15:04 tg Exp $ .\" $NetBSD: elf2aout.1,v 1.9 2003/02/25 10:35:40 wiz Exp $ .\" .\" 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 .Os .Sh NAME .Nm elf2aout .Nd convert a MirBSD ELF-format executable to MirBSD a.out format .Sh SYNOPSIS .Nm elf2aout .Ar elf-file .Ar aout-file .Op Fl bs .Sh DESCRIPTION Reads a fully-linked ELF executable (such as a linked kernel) and produces an equivalent a.out format executable file. .Pp The .Nm utility is used to convert native .Mx BSD ELF binaries to a.out format, for compatibility with bootblocks and kernel-reading utilities like .Xr kvm 3 and .Xr kvm_mkdb 8 , as well as some versions of OpenFirmware, which currently expect an a.out format kernel. .Pp When using the .Fl s option, the a.out header magic symbol flag is set. When using the .Fl b flag, on certain architectures a different a.out header magic MID (machine ID) is set, to allow for creating bootable images. The values set are MID_PMAX on EM_MIPS and 0x0103 on EM_SPARC\*. .\" .Sh DIAGNOSTICS .Sh SEE ALSO .Xr ld 1 , .Xr kvm 3 , .Xr a.out 5 , .Xr elf 5 , .Xr kvm_mkdb 8 .Sh HISTORY .Nm was originally developed for NetBSD\(rg/pmax by Ted Lemon and was first distributed with the pmax port of .Nx 1.1 . .Nm appeared in .Mx 7ter . Endianness awareness was added for .Mx 9 . .Sh BUGS .Nm assumes there are no multiply-referenced symbols in the input ELF symbol section. It may be necessary to link with the .Fl x option to .Xr ld 1 to avoid such duplicate symbols. .Pp In some environments, the GNU binutils .Xr objcopy 1 utility may be a better solution than .Nm elf2aout .