19 / 30
Compilation and Linking in Several Steps
Preprocessing only:
gcc -E hello.c -o hello.i
To stop after the stage of compilation proper and produce assembly
language in hello.s
:
gcc -S hello.i
Compiling without linking can be done with the -c
option.
The output file will be hello.o
and will contain object code.
gcc -c hello.s
Linking:
gcc -o hello hello.o