`
yaojingguo
  • 浏览: 202114 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Some Usages of GCC

阅读更多

gcc has a very large number of options. Here I am writing some of them to help remember some common usages.

Generating Assembly Code

Using gcc with -S option will generated assembly code and then stop. For example:

    $ gcc -S helloworld.c

Preprocessing                

Using gcc with -E will only run preprocessor.

   $ gcc   -E helloworld.c -o helloworld.i

Output asm instructions using selected dialect

  • Intel dialect: $ gcc -S -masm=intel helloworld.c
  • AT&T dialect: $ gcc -S -masm=att helloworld.c
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics