如何在x86架构上使用gcc生成a.out文件格式?使用gcc生成a.out文件格式
随着NASM我可以用-f标志很容易地做到这一点,例如:
[[email protected]]$ nasm -f aout start.asm
[[email protected]]$ objdump -a start.o
start.o: file format a.out-i386-linux
start.o
[[email protected]]$
在Linux,编译.c文件生成一个ELF对象。我如何使用gcc生成a.out文件?
您正在使用哪个系统?我不认为Linux支持a.out可执行文件了。我不知道中间目标文件。 –
我相信内核可以配置a.out支持,但默认关闭。自从我编译一个内核以来已经有一段时间了,可能不再是这种情况。 – goldfire
如果在编译时启用了CONFIG_BINFMT_AOUT,Linux确实会支持它。 –