What is the difference between ELF files and bin files?

后端 未结 4 1703
温柔的废话
温柔的废话 2020-12-12 09:43

The final images produced by compliers contain both bin file and extended loader format ELf file ,what is the difference between the two , especially the utility of ELF file

4条回答
  •  执念已碎
    2020-12-12 09:49

    some resources:

    1. ELF for the ARM architecture
      http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044d/IHI0044D_aaelf.pdf
    2. ELF from wiki
      http://en.wikipedia.org/wiki/Executable_and_Linkable_Format

    ELF format is generally the default output of compiling. if you use GNU tool chains, you can translate it to binary format by using objcopy, such as:

      arm-elf-objcopy -O binary [elf-input-file] [binary-output-file]
    

    or using fromELF utility(built in most IDEs such as ADS though):

     fromelf -bin -o [binary-output-file] [elf-input-file]
    

提交回复
热议问题