Fix file-/pathnames which have changed now.
[dragonfly.git] / share / man / man4 / man4.i386 / linux.4
1 .\" Copyright (c) 2000 Sheldon Hearn
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $DragonFly: src/share/man/man4/man4.i386/linux.4,v 1.1 2003/09/17 23:08:13 hmp Exp $
26 .\" $FreeBSD: src/share/man/man4/man4.i386/linux.4,v 1.6 2002/12/12 17:25:57 ru Exp $
27 .Dd September 17, 2003
28 .Dt LINUX 4 i386
29 .Os
30 .Sh NAME
31 .Nm linux
32 .Nd Linux ABI support
33 .Sh SYNOPSIS
34 To link Linux ABI support into the kernel:
35 .Cd "options COMPAT_LINUX"
36 .Pp
37 To load the Linux ABI support kernel module:
38 .Dl kldload linux
39 .Sh DESCRIPTION
40 The
41 .Nm
42 module provides limited
43 Linux ABI (Application Binary Interface) compatibility
44 for userland applications.
45 The module provides the following significant facilities:
46 .Bl -bullet
47 .It
48 An image activator for correctly branded
49 .Xr elf 5
50 executable images
51 .It
52 Special signal handling for activated images
53 .It
54 Linux to native system call translation
55 .El
56 .Pp
57 It is important to note that the Linux ABI support
58 is not provided through an emulator, instead,
59 a true (albeit limited) ABI implementation is provided.
60 .Pp
61 The following
62 .Xr sysctl 8
63 tunable variables are available:
64 .Bl -tag -width compat.linux.oss_version
65 .It compat.linux.osname
66 Linux kernel operating system name.
67 .It compat.linux.osrelease
68 Linux kernel operating system release.
69 .It compat.linux.oss_version
70 Linux Open Sound System version.
71 .El
72 .Pp
73 The
74 .Nm
75 module can be linked into the kernel statically with the
76 .Dv COMPAT_LINUX
77 kernel configuration option
78 or loaded as required.
79 The following command will load the module
80 if it is neither linked into the kernel
81 nor already loaded as a module:
82 .Bd -literal -offset indent
83 if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
84         kldload linux > /dev/null 2>&1
85 fi
86 .Ed
87 .Pp
88 Note that dynamically linked Linux executables
89 will require a suitable environment in
90 .Pa /compat/linux .
91 Specifically, the Linux run-time linker's hints files
92 should be correctly initialized.
93 For this reason, it is common to execute the following commands
94 to prepare the system to correctly run Linux executables:
95 .Bd -literal -offset indent
96 if [ -x /compat/linux/sbin/ldconfig ]; then
97         /compat/linux/sbin/ldconfig
98 fi
99 .Ed
100 .Pp
101 For information on loading the
102 .Nm
103 kernel loadable module automatically on system startup,
104 see
105 .Xr rc.conf 5 .
106 This information applies
107 regardless of whether the
108 .Nm
109 module is statically linked into the kernel
110 or loaded as a module.
111 .Sh FILES
112 .Bl -tag -width /compat/linux/proc -compact
113 .It Pa /compat/linux
114 minimal Linux run-time environment
115 .It Pa /compat/linux/proc
116 limited Linux process file system
117 .El
118 .Sh SEE ALSO
119 .Xr brandelf 1 ,
120 .Xr elf 5 ,
121 .Xr linprocfs 5
122 .Sh HISTORY
123 Linux ABI support first appeared in
124 .Fx 2.1 .