COMPAT_NETBSD32(8)
π NAME π
Hey bestie, welcome to the COMPAT_NETBSD32(8) page from the System Manager's Manual π
compat_netbsd32 β setup procedure for 32-bit compatibility on 64-bit platforms π«Ά
β¨ DESCRIPTION β¨
Okay so the compat_netbsd32 module is literally the bridge that lets NetBSD/sparc64 run NetBSD/sparc executables, NetBSD/aarch64 run NetBSD/arm executables, NetBSD/mips64 run NetBSD/mips executables, and NetBSD/amd64 run NetBSD/i386 executables π
β¨
On NetBSD/mips64, the default userland is N32, which is handled by the compat_netbsd32 framework, and 64-bit binaries are handled similarly to the setup for 32-bit compatibility π It also provides compatibility between OABI and EABI binaries on 32-bit NetBSD/arm ports π¦
To use compat_netbsd32, one must either have COMPAT_NETBSD32 and EXEC_ELF32 in the kernel, or load the compat_netbsd32 and exec_elf32 kernel modules π§
Static executables typically need no additional setup β iconic, no notes π Dynamic binaries require the dynamic linker plus shared libraries, periodt.
Since NetBSD 5.0 the base system has directly included support for 32-bit compatibility by installing 32-bit libraries and dynamic linker into /usr β¨ This includes compiler support for compiling 32-bit applications on platforms where this is supported π«Ά
For a.out compatibility, /usr/libexec/ld.so from a 32-bit distribution is required to exist, and the a.out shared libraries must be found in /emul/aout as normal for a.out compatibility π
For 32-bit (64-bit on NetBSD/mips64) ELF compatibility, the relevant /usr/libexec/ld.elf_so needs to be found in:
- Port
amd64, targeti386:/usr/libexec/ld.elf_so-i386 - Port
sparc64, targetsparc:/usr/libexec/ld.elf_so-sparc - Port
mips64, targetO32:/usr/libexec/ld.elf_so-o32 - Port
mips64, targetN64:/usr/libexec/ld.elf_so-64 - Port
powerpc64, targetpowerpc:/usr/libexec/ld.elf_so-powerpc - Port
arm64, targeteabi:/usr/libexec/ld.elf_so-eabi
Note that the kernel handles rewriting the built-in ELF interpreter to the above path π
Before NetBSD 5.0 all of these files needed to be placed under /emul/netbsd32 π°οΈ
The shared libraries for a.out binaries do not live under the /emul/netbsd32 directory, but under the /emul/aout directory, where the a.out dynamic linker will find them πΈ
π BUGS π
A list of things which fail to work in compatibility mode should be here π
Heads up bestie: those unsupportedioctl(2)commands are a real vibe-check fail, especiallydrm(4)β the page is very clear about that π
And that's the whole page, bestie π The source/version is Debian, dated January 17, 2019, and it signs off as COMPAT_NETBSD32(8). Stay compat-slaying π
β¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2001, 2019 Matthew R. Green
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms