If you do not specify what file to compile, gcc default one step, directly generate the executable file
You can try some of the following parameters
-C
Only activates preprocessing, compilation, and assembly, that is, he only makes the program obj file
Example usage:
Gcc-c hello.c
He will generate the. O obj file
-S
Only pre-processing and compilation are activated, which means compiling the files into assembly code.
Example usage
Gcc-s hello.c
He will generate the assembly code for. S, which you can view with a text editor
-E
Just activate the preprocessing, this does not generate the file, you need to redirect it to an output file inside.
Example usage:
GCC-E hello.c > Pianoapan.txt
GCC-E hello.c | More
-O
Specify the target name, by default, the GCC compiled file is a.out,
Example usage
Gcc-o hello.asm-s hello.c
How to generate obj files after compiling C language code for Linux