Home > Computer Science > Generate Assembly codes from C

Generate Assembly codes from C

I was searching for a way to generate assemly codes from C codes for one of my projects.

I was looking for a tool which would create assembly codes from binary codes that were created using a compiler like gcc.

Looks like Life is much simpler. I made the discovery that there is a switch to gcc which directly created assembly codes from C codes.

The switch is -S.
syntax gcc -S program .c and you will get program.s in assembly

I tried the same with arm-linux-gcc, the cross-compiler for arm-architecture and it works there too!

Long live gcc

Categories: Computer Science
  1. No comments yet.
  1. No trackbacks yet.