gcc is a "driver" program. It merely processes command line options, then
calls other programs to do the work. Certain options require decoding using
a
specs file to specify how to pass information down.
- Text transformation - line continuation, comment removal.
- Tokenization. eg. a+++b -> a ++ + b
- Include header file contents, expand macros.
- gcc -E stops here, producing a ".i" file.
- cc1, the C compiler proper.
- Lots of interesting things happen in a number of compiler passes.
- gcc -S stops here, producing a ".s" file.
- gcc -c stops here, producing a ".o" file.
- Combines the object file with system libraries and startup files. Often
called via collect2.
Reveal all with
-v
.
Keep the intermediate files with
-save-temps
.