xref: /netbsd/share/man/man8/compat_netbsd32.8 (revision 6550d01e)
1.\"	$NetBSD: compat_netbsd32.8,v 1.8 2008/05/29 14:51:25 mrg Exp $
2.\"
3.\" Copyright (c) 2001 Matthew R. Green
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd March 11, 2006
28.Dt COMPAT_NETBSD32 8
29.Os
30.Sh NAME
31.Nm compat_netbsd32
32.Nd setup procedure for 32-bit compatibility on 64-bit platform
33.Sh DESCRIPTION
34The
35.Nm
36module allows
37.Nx Ns Tn /sparc64
38to run
39.Nx Ns Tn /sparc
40executables, and
41.Nx Ns Tn /amd64
42to run
43.Nx Ns Tn /i386
44executables.
45.Pp
46To use
47.Nm ,
48one must either have
49.Dv COMPAT_NETBSD32
50and
51.Dv EXEC_ELF32
52in the kernel, or load the compat_netbsd32 and exec_netbsd32 kernel
53modules.
54.Pp
55Static executables typically need no additional setup.
56Dynamic binaries require the dynamic linker plus shared libraries.
57Most of these files will need to be placed under
58.Pa /emul/netbsd32 .
59.Pp
60The easiest method of installing support for these is via the
61.Pa emulators/netbsd32_compat14 ,
62.Pa emulators/netbsd32_compat15 ,
63and
64.Pa emulators/netbsd32_compat16
65packages, provided in the
66.Nx
67packages collection.
68These install 32-bit a.out and ELF compatibility libraries,
69respectively.
70The details of what is actually necessary for correct operation
71are given below.
72This obviously is handled by the emulator packages.
73.Pp
74For a.out compatibility,
75.Pa /usr/libexec/ld.so
76from a 32-bit distribution is required to exist as
77.Pa /emul/netbsd32/usr/libexec/ld.so .
78For 32-bit ELF compatibility,
79.Pa /usr/libexec/ld.elf_so
80needs to be in
81.Pa /emul/netbsd32/usr/libexec/ld.elf_so .
82.Pp
83The shared libraries for a.out binaries do not live under the
84.Pa /emul/netbsd32
85directory, but under the
86.Pa /emul/aout
87directory, where the a.out dynamic linker will find them.
88.Sh BUGS
89A list of things which fail to work in compatibility mode should
90be here.
91.Pp
92IPC is not well supported.
93.Pp
94.Xr sysctl 3
95is not well supported.
96