ELF文件和bin文件有什么区别? [英] What is the difference between ELF files and bin files?

查看:453
本文介绍了ELF文件和bin文件有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编译器生成的最终图像包含bin文件和扩展加载程序格式的ELf文件,两者之间有什么区别,尤其是ELF文件的实用程序.

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.

推荐答案

Bin文件是一个纯二进制文件,没有内存修复或重定位,很可能它有明确的指令要加载到特定的内存地址.而....

A Bin file is a pure binary file with no memory fix-ups or relocations, more than likely it has explicit instructions to be loaded at a specific memory address. Whereas....

ELF 文件是可执行的可链接格式,由符号查找和可重定位表组成,也就是说,内核可以将其加载到任何内存地址,并自动将所有使用的符号调整为与加载它的那个内存地址的偏移量.通常,ELF文件具有多个部分,例如数据",文本","bss"等,但其中一些...在这些部分中,运行时可以计算出调整符号的内存引用的位置.在运行时动态地运行.

ELF files are Executable Linkable Format which consists of a symbol look-ups and relocatable table, that is, it can be loaded at any memory address by the kernel and automatically, all symbols used, are adjusted to the offset from that memory address where it was loaded into. Usually ELF files have a number of sections, such as 'data', 'text', 'bss', to name but a few...it is within those sections where the run-time can calculate where to adjust the symbol's memory references dynamically at run-time.

这篇关于ELF文件和bin文件有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆