Creating ELF instead of a.out

后端 未结 2 1233
孤独总比滥情好
孤独总比滥情好 2020-12-21 09:18

I need to generate a simple \"Hello World\" ELF32 executable using gcc. I don\'t seem to have the gcc-elf command though. Is it possible to create ELF binaries instead of a.

2条回答
  •  没有蜡笔的小新
    2020-12-21 10:18

    Check the file a.out

    $ file a.out
    a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

    I believe the default name is retained as a.out but the format is ELF.

提交回复
热议问题