Reputation: 17457
is it possible? I want to use gcc
like assembler
and after compile it to executable on ubuntu.
I tried it:
gcc a.asm -o out.o
and from out.o
file compiler it to .out
executable file.
but I get the following error:
file format not recognized; treating as linker script.
I'm new on linux environment. I hope this is clean for you. Any help is very appreciadted. Thanks in advance.
Upvotes: 0
Views: 501
Reputation: 182865
Read the documentation for the -x
option to gcc
. It allows you to specify the language of the source file.
Upvotes: 3
Reputation: 7238
Change file name a.asm to a.s and let gcc autodetect assembler (by extension).
Upvotes: 5