[comp.sys.sun] a.out =?= executable

hesh@lll-crg.llnl.gov (Chris Steinbroner) (03/17/90)

according to the as(1) man page, the default output is "a.out."
traditionally, as(1) produces a ".o", which is not an executable,
requiring tweaking with ld(1) to resolve external references, and to
perhaps change the file type in the header to make it executable.

can someone please explain how and why as(1) has changed?  for bonus
points, what is the history behind calling an executable "a.out," even
though ld(1) is what has traditionally produced a.out.

please respond by e-mail, as i don't usually read this newsgroup.

henry@zoo.toronto.edu (03/20/90)

> according to the as(1) man page, the default output is "a.out."
> traditionally, as(1) produces a ".o"...
> can someone please explain how and why as(1) has changed?

It hasn't.  as(1) has produced "a.out" by default since at least Fifth
Edition, circa 1975, and probably from the beginning.  "as foo.s" gives
"a.out", and always has.  "cc foo.s", on the other hand, ends up invoking
the assembler in such a way as to put the output into "foo.o".  I suspect
you are confusing the two.

> for bonus
> points, what is the history behind calling an executable "a.out," even
> though ld(1) is what has traditionally produced a.out.

"a.out" is, I think, "assembler output" shortened.  ld(1) came later.

                                    Henry Spencer at U of Toronto Zoology
                                uunet!attcan!utzoo!henry henry@zoo.toronto.edu

hesh@lll-crg.llnl.gov (Chris Steinbroner) (03/20/90)

> > according to the as(1) man page, the default output is "a.out."
> > traditionally, as(1) produces a ".o"...
> > can someone please explain how and why as(1) has changed?
> 
> It hasn't.  as(1) has produced "a.out" by default since at least Fifth
> Edition, circa 1975, and probably from the beginning.  "as foo.s" gives
> "a.out", and always has.

it has been discovered that AT&T deviated from the "traditional" behaviour
and changed as(1) to produce "foo.o".  Sun and Berkeley versions retain
the old ways.