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

查看:32
本文介绍了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天全站免登陆