Updated: 2022/Sep/29

Please read Privacy Policy. It's for your privacy.


COMPAT_BSDOS(8)             System Manager's Manual            COMPAT_BSDOS(8)

NAME
     compat_bsdos - binary compatibility for BSDi releases

DESCRIPTION
     The COMPAT_NOMID kernel option includes compatibility with BSDi 1.x-3.x
     a.out(5) binaries on NetBSD/i386 and NetBSD/amd64.  The option is enabled
     by default in the GENERIC kernel on i386, but needs to be set along with
     EXEC_AOUT on amd64.

     Null memory protection must be disabled with the sysctl(7) option
     vm.user_va0_disable set to 0 for the binaries to run successfully.

     BSD/OS binaries may be placed under /emul directory to match the location
     of other non-native executables on NetBSD, but the compatibility
     environment does not automatically lookup libraries under /emul/bsdos as
     happens with the shared libraries for NetBSD 1.0-1.5 a.out(5) binaries
     under /emul/aout.

     BSD/386 1.0-1.1 uses static binaries that do not dynamically load
     libraries at runtime.

     BSD/OS 2.0 introduced "static shared libraries" as the default for
     standard binaries.  The shared libraries are compiled from /lib and
     /usr/lib to a custom format bound to memory loading addresses for each
     library under /shlib.  BSDi libraries under /shlib are not in the
     standard ar(5) or position-independent shared object formats and cannot
     be loaded by ldconfig(8) on NetBSD.  In order for BSDi executables to
     access the objects at the hardcoded /shlib path, the user may setup a
     symbolic link from /shlib to /emul/bsdos/shlib.

     BSD/OS 4.0 switched to an ELF binary executable format that does not run
     under the compatibility layers currently available on NetBSD.

SEE ALSO
     ld.aout_so(1), options(4), a.out(5), elf(5), sysctl(7),
     compat_netbsd32(8), ldconfig(8)

HISTORY
     BSD/386 1.0-1.1 was derived from 4.3BSD Reno code in the Net/2 release.

     BSD/OS 2.0 was based on 4.4BSD Lite, but added the new static shared
     library format as the runtime default for executables.  The build system
     included the shlicc command with the -Bstatic flag that allowed reverting
     to the standard library archive format that remained available under /lib
     and /usr/lib.

     NetBSD 1.0 added shared libraries using a standard position-independent
     shared object format.  The previous default relocatable libraries in the
     traditional ar(5) format remained available.

     OpenBSD 2.2-4.7 included a different compatibility implementation under
     the COMPAT_BSDOS kernel option.

BUGS
     BSD/OS compatibility was broken on NetBSD 5-6.

     BSD/OS 3.0 added SPARC support, but the binaries are incorrectly
     recognized as SunOS executables and fail on NetBSD/sparc and
     NetBSD/sparc64.

NetBSD 10.99                    August 27, 2020                   NetBSD 10.99