summaryrefslogtreecommitdiff
path: root/share/man/man8/compat_ibcs2.8
blob: e78ed1807c6b2d417e6c0b3d4a37d1f4e700281e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
.\"	$OpenBSD: compat_ibcs2.8,v 1.14 2003/08/23 19:26:25 tedu Exp $
.\"
.\" Copyright (c) 1998 Scott Bartram
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"      This product includes software developed for the NetBSD Project
.\"      by Scott Bartram and Frank van der Linden
.\" 4. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" Based on compat_linux.8
.\"
.Dd February 8, 1998
.Dt COMPAT_IBCS2 8
.Os
.Sh NAME
.Nm compat_ibcs2
.Nd setup for running iBCS2 binaries under emulation
.Sh DESCRIPTION
.Ox
supports running Intel Binary Compatibility Standard 2 (iBCS2)
binaries.
This only applies to i386 systems for now.
Binaries are supported from SCO UNIX and other systems derived from UNIX
System V Release 3.
iBCS2 support is only well tested using SCO binaries.
XENIX binaries are also supported although not as well tested.
This option is controlled by the kern.emul.ibcs2
.Xr sysctl 8 .
SVR4 binaries are supported by the
.Nm COMPAT_SVR4
option.
.Pp
iBCS2 supports COFF, ELF, and x.out (XENIX) binary formats.
Binaries from SCO OpenServer (version 5.x) are the only ELF binaries
that have been tested.
Most programs should work, but not ones that use or depend on:
.Pp
.Bl -tag -width 123 -compact -offset indent
.It kernel internal data structures
.It STREAMS drivers (other than TCP/IP sockets)
.It local X displays (uses a STREAMS pipe)
.It virtual 8086 mode
.El
.Pp
The iBCS2 compatibility feature is active for kernels compiled with
the
.Nm COMPAT_IBCS2
option enabled.
If support for iBCS2 ELF executables is desired,
the
.Nm EXEC_ELF32
option should be enabled in addition to
.Nm COMPAT_IBCS2 .
.Pp
Many COFF-format programs and most ELF-format programs are dynamically
linked.
This means that the shared libraries that the program
depends on will also be needed.
Also, a "shadow root" directory for iBCS2 binaries
on the
.Ox
system will have to be created.
This directory is named
.Pa /emul/ibcs2 .
Any file operations done by iBCS2 programs run
under
.Ox
will look in this directory first.
So, if an iBCS2 program opens, for example,
.Pa /etc/passwd ,
.Ox
will first try to open
.Pa /emul/ibcs2/etc/passwd ,
and if that does not exist open the `real'
.Pa /etc/passwd
file.
It is recommended that iBCS2 packages that include
configuration files, etc., be installed under
.Pa /emul/ibcs2 ,
to avoid naming conflicts with possible
.Ox
counterparts.
Shared libraries should also be installed in the shadow tree.
.Pp
Generally, it will only be necessary to look for the shared libraries that
iBCS2 binaries depend on the first few times
iBCS2 programs are installed on the
.Ox
system.
After a while, there will be a sufficient set of iBCS2 shared libraries
on the system to be able to run newly imported iBCS2 binaries without
any extra work.
.Ss Setting up shared libraries
How to get to know which shared libraries iBCS2 binaries need, and
where to get them?
Depending on the file type of the executable, there are different
possibilities.
(When following these instructions, root privileges are required
on the
.Ox
system to perform the necessary installation steps).
.Bl -tag -width 123
.It 1. COFF binaries
Simply copy all of the available shared libraries since they
are fairly small in size.
The COFF shared libraries are typically found in
.Pa /shlib
and can be obtained from the following sources:
.Bd -unfilled -offset indent
SCO UNIX version 3.x (aka ODT)
SCO UNIX version 5.x (aka OpenServer)
SCO UnixWare
Many versions of SVR4.2/x86
.Ed
.Pp
After copying the shared libraries, the following files should be
present on the
.Ox
system:
.Bd -unfilled -offset indent
/emul/ibcs2/shlib/libc_s
/emul/ibcs2/shlib/libnsl_s
/emul/ibcs2/shlib/protlib_s
.Ed
.It 2. ELF binaries
Copy all of the available shared libraries from the
source system or distribution, or use the `ldd-elf' program (in
development) to determine the libraries required by a specific binary.
.Pp
After copying the shared libraries, the following files should be
present on the
.Ox
system:
.Bd -unfilled -offset indent
/emul/ibcs2/usr/lib/libc.so.1
/emul/ibcs2/usr/lib/libcrypt.so
/emul/ibcs2/usr/lib/libndbm.so
/emul/ibcs2/usr/lib/libsocket.so.1
.Ed
.El
.Pp
If access to an SCO system is impossible, the extra files will need to be
obtained from an SCO distribution.
As of January 1998, SCO sells a copy of SCO OpenServer (iBCS2) and/or
SCO UnixWare (SVR4) for personal/non-commercial use for only the cost
of shipping (about $20US).
The distribution comes on an ISO9660-format CDROM which can be mounted
and used to copy the necessary files.
.Sh BUGS
The information about SCO distributions may become outdated.
.Pp
Attempting to use a nameserver on the local host does not currently
work due to an absurd shortcut taken by the iBCS2 network code
(remember that there are no kernel sockets).
.Pp
16/32/64 bit offsets may not be handled correctly in all cases.