Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Why use (what are) a.out and ELF executable formats?
Previous: FreeBSD uses far more swap space than Linux. Why?
Next: Yes, but why are there so many different

12.2. Why use (what are) a.out and ELF executable formats?

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 has traditionally used 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, FreeBSD initially resisted the "push" to switch to ELF as the default format. 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, our shared library mechanism is based more closely on Sun's SunOS-style shared library mechanism and, as such, is very easy to use. However, starting with 3.0, FreeBSD officially supports ELF binaries as the default format. Even though the a.out executable format has served us well, the GNU people, who author the compiler tools we use, have dropped support for the a.out format. This has forced us to maintain a divergent version of the compler and linker, and has kept us from reaping the benefits of the latest GNU development efforts. Also the demands of ISO-C++, notably contstructors and destructors, has also led to native ELF support in future FreeBSD releases.


Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Why use (what are) a.out and ELF executable formats?
Previous: FreeBSD uses far more swap space than Linux. Why?
Next: Yes, but why are there so many different