Monday, March 8, 2010

Mystery behind a.out in unix/linux

Many people are intrigued by the output file a.out formed as a result of compilation of C/C++ code on linux environment.
Why a.out?

Well, the reason behind this is more historical than logical, a.out stands for assembler output, although in case of C/C++ its actually linker output that is the final product, On the PDP-7 (even before the B language), there was no linker. Programs were created by assembling the catenation of all the source files, and the resulting assembler output went in a.out. The convention stuck around for the final output even after a linker was finally written for the PDP-11; the name had come to mean "a new program ready to try to execute."

No comments:

Post a Comment