6

I'm wanting to look at the assembly output from a particular piece of code and generally I prefer reading nasm syntax compared to AT&T syntax. Is there a convenient way to get nasm assembly format output from gcc?

shuttle87
  • 15,466
  • 11
  • 77
  • 106
  • 1
    See this answer. http://stackoverflow.com/questions/137038/how-do-you-get-assembler-output-from-c-c-source-in-gcc/137056#137056 – Mat May 15 '11 at 08:25

1 Answers1

10

You want intel syntax. I believe it's achieved with

-masm=intel

EDIT

Of course, you can also use objdump for this:

objdump -M intel -d <binary>
cnicutar
  • 178,505
  • 25
  • 365
  • 392