I think there might be a few bugs left, but it basically works,
certainly it works well enough for spec. What it's supposed to do is:
- 'gcc foo.c bar.c -o foo' takes the two .c files, builds a single .s
file, sends that to the assembler and the resulting .o to the
linker.
- 'gcc -save-temps foo.c bar.c -o foo' turns each .c file into a .i
file, producing foo.i and bar.i, then builds a single .s file from
them.
- 'gcc foo.c bar.c -S' produces two .s files, foo.s and bar.s.
- likewise, 'gcc foo.c bar.c -c' produces two .o files.
- 'gcc foo.c bar.c -S -o result.s' produces one .s file.
- likewise, 'gcc foo.c bar.c -c -o result.o' produces one .o file