GCC Compilation
GCC (upper case) refers to the GNU Compiler Collection.
gcc (lower case) is the C compiler in the GNU Compiler Collection.
Compilation steps
1) Pre-processing
The preprocessor obeys commands that begin with "#" (known as directives) by:
2) Compiling
3) Assembly
4) Linking
Static Linking
Dynamic Linking
If you use a non-standard library, you must specify its location by:
Basic GCC syntax
This will do all the steps discussed above and generate an executable (ELF) file named app.
Useful GCC options
C and disassembly
The gcc option -O enables different levels of optimization.
To change the syntax of the assembly to either Intel or AT&T use:
Optimization Flags
Strip and reduce binary size
Last updated