]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/man4.i386/linux.4
This commit was generated by cvs2svn to compensate for changes in r161701,
[FreeBSD/FreeBSD.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 .\" $FreeBSD$
26 .Dd June 18, 2006
27 .Dt LINUX 4 i386
28 .Os
29 .Sh NAME
30 .Nm linux
31 .Nd Linux ABI support
32 .Sh SYNOPSIS
33 To link Linux ABI support into the kernel:
34 .Cd "options COMPAT_LINUX"
35 .Pp
36 To load the Linux ABI support kernel module:
37 .Dl kldload linux
38 .Sh DESCRIPTION
39 The
40 .Nm
41 module provides limited
42 Linux ABI (application binary interface) compatibility
43 for userland applications.
44 The module provides the following significant facilities:
45 .Bl -bullet
46 .It
47 An image activator
48 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 it not provided through an emulator.
59 Rather, 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 Changing this to something else is discouraged on non-development systems,
70 because it may change the way linux programs work.
71 Recent versions of GNU libc are known to use different syscalls depending
72 on the value of this sysctl.
73 .It compat.linux.oss_version
74 Linux Open Sound System version.
75 .El
76 .Pp
77 The
78 .Nm
79 module can be linked into the kernel statically with the
80 .Dv COMPAT_LINUX
81 kernel configuration option
82 or loaded as required.
83 The following command will load the module
84 if it is neither linked into the kernel
85 nor already loaded as a module:
86 .Bd -literal -offset indent
87 if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
88         kldload linux > /dev/null 2>&1
89 fi
90 .Ed
91 .Pp
92 Note that dynamically linked Linux executables
93 will require a suitable environment in
94 .Pa /compat/linux .
95 Specifically, the Linux run-time linker's hints files
96 should be correctly initialized.
97 For this reason, it is common to execute the following commands
98 to prepare the system to correctly run Linux executables:
99 .Bd -literal -offset indent
100 if [ -x /compat/linux/sbin/ldconfig ]; then
101         /compat/linux/sbin/ldconfig -r /compat/linux
102 fi
103 .Ed
104 .Pp
105 For information on loading the
106 .Nm
107 kernel loadable module automatically on system startup,
108 see
109 .Xr rc.conf 5 .
110 This information applies
111 regardless of whether the
112 .Nm
113 module is statically linked into the kernel
114 or loaded as a module.
115 .Sh FILES
116 .Bl -tag -width /compat/linux/proc -compact
117 .It Pa /compat/linux
118 minimal Linux run-time environment
119 .It Pa /compat/linux/proc
120 limited Linux process file system
121 .It Pa /compat/linux/sys
122 limited Linux system file system
123 .El
124 .Sh SEE ALSO
125 .Xr brandelf 1 ,
126 .Xr elf 5 ,
127 .Xr linprocfs 5 ,
128 .Xr linsysfs 5
129 .Sh HISTORY
130 Linux ABI support first appeared in
131 .Fx 2.1 .