Tue Sep 1 01:15:28 2020 UTC ()
Improvements from Dan Plassche.


(uwe)
diff -r1.4 -r1.5 src/share/man/man8/compat_bsdos.8

cvs diff -r1.4 -r1.5 src/share/man/man8/compat_bsdos.8 (expand / switch to unified diff)

--- src/share/man/man8/compat_bsdos.8 2020/08/29 21:42:25 1.4
+++ src/share/man/man8/compat_bsdos.8 2020/09/01 01:15:28 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: compat_bsdos.8,v 1.4 2020/08/29 21:42:25 uwe Exp $ 1.\" $NetBSD: compat_bsdos.8,v 1.5 2020/09/01 01:15:28 uwe Exp $
2.\" 2.\"
3.\" Copyright (c) 2020 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2020 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Dan Plassche. 7.\" by Dan Plassche.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -48,73 +48,146 @@ The option is enabled by default in the @@ -48,73 +48,146 @@ The option is enabled by default in the
48kernel on i386, 48kernel on i386,
49but needs to be set along with 49but needs to be set along with
50.Dv EXEC_AOUT 50.Dv EXEC_AOUT
51on amd64. 51on amd64.
52.Pp 52.Pp
53Null memory protection must be disabled with the 53Null memory protection must be disabled with the
54.Xr sysctl 7 54.Xr sysctl 7
55option 55option
56.Va vm.user_va0_disable 56.Va vm.user_va0_disable
57set to 57set to
58.Li 0 58.Li 0
59for the binaries to run successfully. 59for the binaries to run successfully.
60.Pp 60.Pp
61.Bsx 2.0+ 61.Bsx
62binaries also require an 62binaries may be placed under
 63.Pa /emul
 64directory to match the location of other
 65non-native executables
 66on
 67.Nx ,
 68but the compatibility environment
 69does not automatically lookup libraries
 70under
 71.Pa /emul/bsdos
 72as happens with the shared
 73libraries
 74for
 75.Nx 1.0\|\(en\|1.5
 76.Xr a.out 5
 77binaries under
 78.Pa /emul/aout .
 79.Pp
 80.Tn BSD/386 Ns No \ 1.0\|\(en\|1.1
 81uses static binaries that do not
 82dynamically load libraries at runtime.
 83.Pp
 84.Bsx 2.0
 85introduced
 86.Dq "static shared libraries"
 87as the default for standard binaries.
 88The shared libraries are compiled from
 89.Pa /lib
 90and
 91.Pa /usr/lib
 92to a custom format under
 93.Pa /shlib .
 94BSDi libraries
 95under
 96.Pa /shlib
 97are not in the standard
 98.Xr ar 5
 99format and cannot be loaded by
63.Xr ldconfig 8 100.Xr ldconfig 8
64configuration or a symbolic link 101on
65pointing to the 102.Nx .
66.Pa /emul/bsdos/shlib 103In order for BSDi executables to
67directory to run outside of a chroot. 104access the binary objects at the
 105hardcoded
 106.Pa /shlib
 107path,
 108the user may setup a
 109symbolic link from
 110.Pa /shlib
 111to
 112.Pa /emul/bsdos/shlib .
 113.\" or run a shell under a
 114.\" .Ic chroot
 115.\" with the command
 116.\" .Ic chroot "/emul/bsdos/shlib /bin/sh" .
 117.\" One could rebuild the BSDi userland
 118.\" from source using
 119.\" .Pa /emul/bsdos/lib
 120.\" and
 121.\" .Pa /emul/bsdos/usr/lib .
 122.\" Then adding
 123.\" .Pa /emul/bsdos/lib
 124.\" and
 125.\" .Pa /emul/bsdos/usr/lib
 126.\" to
 127.\" .Pa /etc/ld.so.conf
 128.\" and running
 129.\" .Ic ldconfig
 130.\" to regenerate
 131.\" .Pa /var/run/ld.so.hints
 132.\" for a new hybrid setup.
68.Pp 133.Pp
69.Bsx 4.0 134.Bsx 4.0
70switched to an ELF binary executable format 135switched to an ELF binary executable format
71that does not run under the 136that does not run under the
72compatibility layers currently available on 137compatibility layers currently available on
73.Nx . 138.Nx .
74.Sh SEE ALSO 139.Sh SEE ALSO
75.Xr options 4 , 140.Xr options 4 ,
76.Xr a.out 5 , 141.Xr a.out 5 ,
77.Xr elf 5 , 142.Xr elf 5 ,
78.Xr sysctl 7 , 143.Xr sysctl 7 ,
79.Xr compat_netbsd32 8 , 144.Xr compat_netbsd32 8 ,
80.Xr ldconfig 8 145.Xr ldconfig 8
81.Sh HISTORY 146.Sh HISTORY
82.Tn BSD/386 Ns No \ 1.0\|\(en\|1.1 147.Tn BSD/386 Ns No \ 1.0\|\(en\|1.1
83was derived from 148was derived from
84.Bx 4.3 Tn Reno 149.Bx 4.3 Tn Reno
85code in the 150code in the
86.Tn Net/2 151.Tn Net/2
87release. 152release.
88.Pp 153.Pp
89.Bsx 2.0 154.Bsx 2.0
90was based on 155was based on
91.Bx 4.4 Tn Lite , 156.Bx 4.4 Tn Lite ,
92but introduced new static shared libraries 157but added the new static shared library
93compiled into binary objects under 158format as the runtime default for executables.
94.Pa /shlib . 
95The build system included the 159The build system included the
96.Li shlicc 160.Li shlicc
97command with the 161command with the
98.Fl Bstatic 162.Fl Bstatic
99flag that allowed reverting to the standard 163flag that allowed reverting to the standard
100library archive format. 164library archive format that remained available
 165under
 166.Pa /lib
 167and
 168.Pa /usr/lib .
 169.Pp
 170.Nx 1.0
 171added shared libraries using the standard
 172.Xr ar 5
 173archive format.
101.Pp 174.Pp
102.Ox 2.2\|\(en\|4.7 175.Ox 2.2\|\(en\|4.7
103included a different compatibility implementation 176included a different compatibility implementation
104under the 177under the
105.Dv COMPAT_BSDOS 178.Dv COMPAT_BSDOS
106kernel option. 179kernel option.
107.Sh BUGS 180.Sh BUGS
108.Bsx 181.Bsx
109compatibility was broken on 182compatibility was broken on
110.Nx 5\|\(en\|6 183.Nx 5\|\(en\|6 .
111.Pp 184.Pp
112.Bsx 3.0 185.Bsx 3.0
113added 186added
114.Tn SPARC 187.Tn SPARC
115support, but the binaries are incorrectly recognized as 188support, but the binaries are incorrectly recognized as
116.Tn SunOS 189.Tn SunOS
117executables and fail on 190executables and fail on
118.Nx Ns Tn /sparc 191.Nx Ns Tn /sparc
119and 192and
120.Nx Ns Tn /sparc64 . 193.Nx Ns Tn /sparc64 .