1 .\" Copyright (c) 2000 Sheldon Hearn
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
33 To link Linux ABI support into the kernel:
34 .Cd "options COMPAT_LINUX"
36 To load the Linux ABI support kernel module:
41 module provides limited
42 Linux ABI (application binary interface) compatibility
43 for userland applications.
44 The module provides the following significant facilities:
52 Special signal handling for activated images
54 Linux to native system call translation
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.
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.
79 module can be linked into the kernel statically with the
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
92 Note that dynamically linked Linux executables
93 will require a suitable environment in
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
105 For information on loading the
107 kernel loadable module automatically on system startup,
110 This information applies
111 regardless of whether the
113 module is statically linked into the kernel
114 or loaded as a module.
116 .Bl -tag -width /compat/linux/proc -compact
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
130 Linux ABI support first appeared in