How do you get assembler output from C/C++ source in gcc?

后端 未结 17 2091
天命终不由人
天命终不由人 2020-11-22 02:43

How does one do this?

If I want to analyze how something is getting compiled, how would I get the emitted assembly code?

17条回答
  •  感动是毒
    2020-11-22 03:07

    Well, as everyone said, use -S option. If you use -save-temps option, you can also get preprocessed file(.i), assembly file(.s) and object file(*.o). (get each of them by using -E, -S, and -c.)

提交回复
热议问题