[U-Boot-Users] Relocation of code/data in a dynamic linker absent system.

Hi,
I would like to start a discussion on the various techniques of relocation of data & code w.r.t to a non-O.S (no dynamic linker) system. The idea is to compare different thoughts and bring out the best possibility.
To start with,I myself know of a relocation technique, as used by GNU toochians : The concept of VMA/LMA... We link the code in such a way that we have a different execution address(VMA) and a load address(LMA). All we need to do in our initializaton code is to copy the data/text from LMA to VMA before we really start using the data/text.
Comments are welcome.. Rupesh

In message 005e01c33108$6140c540$6706a8c0@SPLENDOR you wrote:
I would like to start a discussion on the various techniques of relocation of data & code w.r.t to a non-O.S (no dynamic linker) system. The idea is to compare different thoughts and bring out the best possibility.
The "best" solution often depends on your requirements. Maybe you should first define what you intend to do...
I understand that you are talking about statically linked images only, right?
To start with,I myself know of a relocation technique, as used by GNU toochians : The concept of VMA/LMA... We link the code in such a way that we have a different execution address(VMA) and a load address(LMA). All we need to do in our initializaton code is to copy the data/text from LMA to VMA before we really start using the data/text.
Actually this is NOT what we call relocation.
Relocation means to modify the instruction and relocation fileds in a relocatable, executable or shared object file to create an executable or shared object file.
See the System V ABI / PowerPC Processor Supplement for deatils (setion 4-3 Relocation, section 5-4 Dynamic Linking).
Best regards,
Wolfgang Denk
participants (2)
-
Rupesh S
-
Wolfgang Denk