単純な「hello world」アプリケーションの場合、GCC コンパイラを使用して .exe ファイルを作成するために次のコマンドを使用しました。
cpp hello.c > hello.i
(成功)
gcc -S hello.i
(成功)
as -o hello.o hello.s
(成功)
最終的に次のコマンドでファイルをリンクして .exe を取得すると、エラーが発生します。
C:\C_Experiments\test>ld -o test2.exe test2.o
test2.o:test2.c:(.text+ 0 x 9): undefined reference to __main
test2.o:test2.c:(.text+0 x 15): undefined reference to printf
ld: test2.o: bad reloc address 0x0 in section `.pdata'