AOUT(4)
okay bestie, welcome to the Kernel Interfaces Manual page for aout(4) β itβs giving legacy executable format realness, and weβre gonna make it make sense π
π NAME π
aout β kernel support for executing binary files in legacy a.out format. Thatβs the whole vibe: itβs the kernel-side helper for running old-school a.out binaries, no cap. β¨
π SYNOPSIS π
the magic spell is literally:
kldload a.out
π DESCRIPTION π
The a.out(5) executable format was used before the release of FreeBSD 3.0. Since i386 was the only supported architecture at that time, a.out(5) executables can only be activated on platforms that support execution of i386 code, such as i386 and amd64. π
To add kernel support for old syscalls and old syscall invocation methods, place the following options in the kernel configuration file:
options COMPAT_43
options COMPAT_FREEBSD32
The COMPAT_FREEBSD32 option is only required on 64-bit CPU architectures. periodt.
The aout.ko module needs to be loaded with the kldload(8) utility in order to support the a.out(5) image activator:
kldload aout
Alternatively, to load the module at boot time, place the following line in loader.conf(5):
aout_load="YES"
The a.out(5) format was mainstream quite a long time ago. Reasonable default settings and security requirements of modern operating systems today contradict the default environment of that time and require adjustments of the system to mimic natural environment for old binaries. π«Ά
The following sysctl(8) tunables are useful for this:
security.bsd.map_at_zeroβ set to1to allow mapping of process pages at address0. Some very oldZMAGICexecutable images require text mapping at address0. π§kern.pid_maxβ old versions of FreeBSD used signed 16-bit type forpid_t. Current kernels use 32-bit type forpid_t, and allow process id's up to99999. Such values cannot be represented by oldpid_t, mostly causing issues for processes usingwait(2)syscalls, for example shells. Set the sysctl to30000to work around the problem. πkern.elf32.read_execβ set to1to force any accessible memory mapping performed by 32-bit process to allow execution, seemmap(2). Old i386 CPUs did not have a bit inPTEwhich disallowed execution from the page, so many old programs did not specifyPROT_EXECeven for mapping of executable code. The sysctl forcesPROT_EXECif mapping has any access allowed at all. The setting is only needed if the host architecture allows non-executable mappings. π₯
π SEE ALSO π
go read the friends too, bestie π
π¦ HISTORY π¦
The a.out(5) executable format was used on ancient AT&T UNIX and served as the main executable format for FreeBSD from the beginning up to FreeBSD 2.2.9. In FreeBSD 3.0 it was superseded by elf(5). iconic lineage, honestly. π
π AUTHORS π
The aout manual page was written by Konstantin Belousov (kib@FreeBSD.org). give them their flowers π
π BUGS π
On 64bit architectures, not all wrappers for older syscalls are implemented. so yeah, thatβs the caveat, bestie π
thatβs the whole aout(4) situation β source/version Debian, date August 14, 2012, page AOUT(4), byeee π
β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms