Using GCC to produce readable assembly?

后端 未结 10 2062
死守一世寂寞
死守一世寂寞 2020-11-22 06:13

I was wondering how to use GCC on my C source file to dump a mnemonic version of the machine code so I could see what my code was being compiled into. You can do this with J

10条回答
  •  梦如初夏
    2020-11-22 06:52

    use -Wa,-adhln as option on gcc or g++ to produce a listing output to stdout.

    -Wa,... is for command line options for the assembler part (execute in gcc/g++ after C/++ compilation). It invokes as internally (as.exe in Windows). See

    >as --help

    as command line to see more help for the assembler tool inside gcc

提交回复
热议问题