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

后端 未结 17 1993
天命终不由人
天命终不由人 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:01

    From: http://www.delorie.com/djgpp/v2faq/faq8_20.html

    gcc -c -g -Wa,-a,-ad [other GCC options] foo.c > foo.lst

    in alternative to PhirePhly's answer Or just use -S as everyone said.

提交回复
热议问题