Reputation: 7594
The title of the post is the question. I can see it is not assembly language ment for the NASM assembler. What assemlby language is gcc's assembly output ment for?
Upvotes: 0
Views: 1819
Reputation: 53960
Mainly, two assembly flavors exists.
GCC usually outputs assembly using the AT&T (GAS) syntax, while NASM uses the Intel syntax.
On some platforms, you can generate assembly in Intel syntax using:
-masm=intel
Unfortunately, this is not supported everywhere. For instance, if using OS X, only the AT&T syntax is supported.
Upvotes: 3
Reputation: 53047
It's in AT&T syntax of the machine you're compiling on, while NASM uses Intel syntax.
-S -masm=intel
will fix it: How do you use gcc to generate assembly code in Intel syntax?
Upvotes: 3