beegee Assem
beegee Assem

Reputation: 79

nasm array1.o: file not recognized: File format not recognized on Linux 32

I am now using BACKTRACK 5 which is almost like ubuntu, a debian and its 32 bit, and I have ins talled nasm, I went to dr. paulcarter's assembly language tutorials and downloaded his sample programs (Linux). I went to the directory where the sample programs are and executed the following instruction

~/Desktop/linux-ex# nasm -f coff array1.asm

~/Desktop/linux-ex# gcc -o array1 array1.o array1c.c

array1.o: file not recognized: File format not recognized collect2: ld returned 1 exit status

The above execution instructions have been provided in the source file comments How can I make these and later my own programs work?

Upvotes: 1

Views: 1595

Answers (1)

Tony
Tony

Reputation: 1657

The Linux kernel supports various binary formats. coff is a particularly old one, and if the kernel still supports it at all, it might not be enabled in modern distributions. Try -f elf instead of -f coff.

Upvotes: 2

Related Questions