First of all, don't call program1a.c or program1b.c "programs". They are commonly called 'source files". The C Standard calls them "compilation units"; although I've never heard anybody actually use that term.
The "compiler" converts a source file into an object file; that is, for each foo.c it creates a foo.o.
The "linker" (or "link editor") converts a set of object files into an executable image file. The extension in the output filename depends on your target environment.
The "compiler driver" is a tool that automates the invocations of the compiler and linker for you. For example, for Gnu C you might type this command:
- gcc -o foo.exe program1a.c program1b.c
The gcc compiler driver performs these steps:
- Compile program1a.c into program1a.o.
- Compile program1b.c into program1b.o.
- Link program1a.o and program1b.o into foo.exe.
- Delete program1a.o and program1b.o.
I'm actually hiding some complexity from you. "Compile foo.c into foo.o" is shorthand for the following steps:
- Preprocess foo.c into foo.i
- Compile foo.i into foo.s
- Assemble foo.s into foo.o
- Delete foo.i and foo.s
Cheers,
donbock