what is a relocatable executable and why it is needed
What is t开发者_高级运维he 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
The key idea you will need for an embedded system relocatable image is this:
- Wherever a jump or call instruction occurs, it should be coded as a relative address rather than absolute. For example, in x86, the
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.
What is the use of relocatable executable?
Take a look here: Relocatable executable
how it is used?
Depends of the language
what do we mean by processes memory map remapping ?
See all here in this document: Multitasking
One suggestion, take a look at some books and at Google. ;-)
精彩评论