Noob questions: ELF binaries, a.out, and xmkmf

Bennett Todd bet at
Wed Jul 7 05:45:17 PDT 2004

2004-07-07T05:33:05 Archaic:
> On Tue, Jul 06, 2004 at 08:36:02PM -0400, Steve wrote:
> > What about when compiling a C or C++ program.  The last time I saw one 
> > was on my solaris account years ago in one of my programming classes. 
> > *.out is what we got when we compiled our programs.
> Key words: "years ago" :)

And today; "gcc hello.c" will produce the ELF executable in a file
named a.out. Why? Tradition, I expect. If you don't give it a name,
it's gotta call it something. Could call it the name of the first
file with the extension stripped off, but most folks achieve that
with a -o argument, often computed by default make rules. Unix C
compilers have always called their output file a.out by default.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the lfs-chat mailing list