This is known as the debugging phase,
during which an attempt is made to
remove all known problems or
bugs
from the program. Doing this requires making changes to the
original source program.
Please note that in such a case, the entire process of compiling, linking,
and executing the program must be repeated until the desired results are obtained. Also note
that in general, gcc follows the following processing steps:
Step 1: Preprocessing (invokes cpp)
Step 2: Compilation
Step 3: Assembly (invoke as)
Step 4: Linking (invokes ld).
This can also be shown graphically, as in
Figures 1.4
and
1.5
.
Figure 1.4
gcc Converting from C to obj Using Assembler
Figure 1.5
gcc: The Linker Converts an obj File to an Executable
In gcc, the level of attempted optimization is controlled by -0 and other switches but one has to be
very careful for embedded and device driver codes.
Do'stlaringiz bilan baham: |