Transcript: $ cat ldbug.s .text .global _start _start: nop $ gcc -c ldbug.s $ ld -e _start -Ttext=0 --oformat binary -o ldbug.bin ldbug.o c:\aaronwl\cs\env\mingw-head-head-head\bin\ld.exe: PE operations on non PE file. This same sequence of commands works without any errors on an ELF target. This was originally reported here <https://sourceforge.net/forum/message.php? msg_id=3207899> by https://sourceforge.net/users/huangxiangkui.
--oformat binary is not well supported anywhere really.