gcc Unless otherwise specified, the gcc command batches the processes of preprocess → compile → assemble → link. You can do these individually by specifying options (excluding links), but I often forget the option name, so a memorandum
** Results are output to standard output.
$gcc -E <FILE.c>
** A .s file (assembly language code) is generated.
$gcc -S <FILE.c>
** A .o file (machine language code) is generated.
$gcc -c <FILE.s>
Many of the strings internally defined by #define start with __ (two underscores), but sometimes they don't. Occasionally, these and the names of variables you define conflict with each other, causing unintended program rewriting (environment-dependent). You can prevent this by knowing the string defined internally by #define.
** Output to standard output
$gcc -dM -xc -E /dev/null
Recommended Posts