什么是可重定位可执行文件以及为什么需要它
可重定位可执行文件有什么用?它是如何生成的以及如何使用它?
进程内存映射重新映射是什么意思?
如果有人可以向我解释嵌入式系统,那就太好了,
提前致谢 -达斯
What is the use of relocatable executable and how is it generated and how it is used ?
what do we mean by processes memory map remapping ?
if some can explain me w.r.to embedded systems , it will be great
thanks in advance
-Das
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嵌入式系统可重定位映像所需的关键思想是:
jmp
操作码可以是:E9
,即jmp rel32
或EA
,即jmp ptr32
。必须以这种方式编码的原因与嵌入式系统特别相关。相比之下,与嵌入式系统相比,操作系统有一个映像加载器,它将可执行文件放入内存中并准备执行。映像加载器执行的部分准备工作涉及根据内存中可执行文件的重定位来重写任何绝对地址。正是这种操作系统设施导致可执行映像中出现“重定位表”。如果没有操作系统工具来解析和操作这些表,则不会发生重定位。
在嵌入式系统设置中,通常的方法不是实现重新映射绝对地址的操作系统工具,而是完全避免绝对地址。
The key idea you will need for an embedded system relocatable image is this:
jmp
opcode could be:E9
, which isjmp rel32
, orEA
, which isjmp ptr32
.The reason you must code in this way is particularly relevant to embedded systems. In contrast, to an embedded system, an Operating System has an image loader which places the executable in memory and prepares it for execution. Part of the preparation performed by the image loader involves re-writing any absolute addresses according to the relocation of the executable in memory. It is this operating system facility which gives rise to the presence of "relocation tables" in executable images. Without an operating system facility to parse and operate upon these tables, no relocation could occur.
In an embedded system setting, the usual approach is not to implement an operating system facility which remaps absolute addresses, but to avoid absolute addresses altogether.
看一下这里:可重定位可执行文件
取决于语言
请参阅本文档中的所有内容:多任务处理
一个建议,看看一些书籍和谷歌。 ;-)
Take a look here: Relocatable executable
Depends of the language
See all here in this document: Multitasking
One suggestion, take a look at some books and at Google. ;-)