Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : What is FreeBSD's a.out executable format, and why not ELF?
Previous: How can I add more swap space?
Next: Why doesn't chmod change the permissions on symlinks?

6.3. What is FreeBSD's a.out executable format, and why not ELF?

To understand why FreeBSD uses the a.out format, you must first know a little about the 3 currently "dominant" executable formats for UNIX:

FreeBSD comes from the "classic" camp and uses the a.out format, a technology tried and proven through many generations of BSD releases. Though it has also been possible for some time to build and run native ELF binaries (and kernels) on a FreeBSD system, no official "push" to switch to ELF as the default format has, as yet, been made. Why? Well, when the Linux camp made their painful transition to ELF, it was not so much to flee the a.out executable format as it was their inflexible jump-table based shared library mechanism, which made the construction of shared libraries very difficult for vendors and developers alike. Since the ELF tools available offered a solution to the shared library problem and were generally seen as "the way forward" anyway, the migration cost was accepted as necessary and the transition made.

In FreeBSD's case, it's not quite so simple since our shared library mechanism is based more closely on Sun's SunOS-style shared library mechanism and, as such, is very easy to use. The only thing we actually lack with a.out which ELF would give us is cleaner support for C++ constructors and destructors, among other similarly esoteric things, and it simply hasn't become much of a problem yet (and there is quite a bit of C++ code in FreeBSD's source tree). Should that change, a migration may, at some point, be more seriously contemplated.


Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : What is FreeBSD's a.out executable format, and why not ELF?
Previous: How can I add more swap space?
Next: Why doesn't chmod change the permissions on symlinks?
FreeBSD Home Page
www@freebsd.org
Updated May 30, 1997