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