b*****n 发帖数: 684 | 1 I want to use GCC to compile a .c file into assembly code. For example, the
source code is written by C, after compilation, the output file is an assembly
code with "mov r1, r2" or something like that. Is GCC able to do this? Thanks. | A*****o 发帖数: 222 | 2 man gcc
-S Stop after the stage of compilation proper; do not
assemble. The output is an assembler code file for
each non-assembler input file specified.
By default, GCC makes the assembler file name for a
source file by replacing the suffix `.c', `.i',
etc., with `.s'. Use -o to select another name.
GCC ignores any input files that don't require com
pilation.
【在 b*****n 的大作中提到】 : I want to use GCC to compile a .c file into assembly code. For example, the : source code is written by C, after compilation, the output file is an assembly : code with "mov r1, r2" or something like that. Is GCC able to do this? Thanks.
|
|