> This may sound really stupid, but in being a computer
technician, I know what it is to be humbled by your work.
...
Fear not. I've been working with these stupid machines since
1962, and have spent the last month being Very Humbled by
gcc and its friends. Today, I finally ran into one of their
problems instead of one mine.
You are in good company.
More traffic follows, not cc'ing gcc.
Bob
Robert Bernecky Snake Island Research Inc.
bern...@acm.org 18 Fifth Street, Ward's Island
+1 416 203 0854 Toronto, Ontario M5J 2B9 Canada
http://www.snakeisland.com
In the interest of expanding everyone's pile of useless trivia: a.out
stands for "assembler output". If you write a trivial program in
assembly, e.g (i386 and Linux specific)
; iefbr14
.text
.globl _start
_start:
movl $0x0, %ebx
movl $0x1, %eax
int $0x80
and do "as test.s", you'll get a file named a.out. On an ELF-based
system that file is not executable, but with older Unixes it would
have been (maybe needing a chmod +x first). You can make it
executable by running ld on it with no further arguments, except that
ld doesn't like having its input and output have the same name, so you
have to do
$ as test.s -o test.o
$ ld test.o
to get an actual executable a.out on an ELF system.
I've heard a legend that on really old Unixes (pre-V7) a trivial C
program could be compiled and assembled into a complete, executable
a.out without any link phase. Hence, the default executable name is
"a.out" because, way back in the mists of 1970, it really was the
output of the assembler. I'm not sure if I believe this - it seems to
me that libc.a and maybe crt0.o would have been needed from the
beginning.
These days, a.out is still the default output name out of historical
inertia. It's also known not to be the name of any system utility or
application, so convenient for trivial programs. ("test" isn't
suitable, that's a shell builtin, more commonly known as "[".)
Mr. Henry may be interested to know that the name can be changed with
the -o option to the compiler, so:
$ cc simple.c -o simple
will create "simple", not "a.out".
zw