アセンブリ コードをコンパイルしようとしています。
コマンドを使用しました
nasm -f coff myMergeSort.asm
gcc driver.c myMergeSort.o asm_io.o -o merge
しかし、私は次のエラーが発生しています:
myMergeSort.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
「coff」の代わりに「obj」を使用してみましたが、同様のエラーが発生します。
「coff」の代わりに「elf」を使用すると、次のエラーが発生します。
myMergeSort.o: In function `main':
myMergeSort.asm:(.text+0x0): multiple definition of `main'
/tmp/cchbsJLl.o:driver.c:(.text+0x0): first defined here
/tmp/cchbsJLl.o: In function `main':
driver.c:(.text+0xa): undefined reference to `asm_main'
collect2: error: ld returned 1 exit status
どうすれば修正できますか?