Skip to contentSkip to conversation

Relocation of code/data in a dynamic linker absent system.

U-Boot-Users Rupesh S 2 participants 2 messages Jun 12, 2003

lore
Share & tools
lore
#1 lore raw
In reply to Rupesh S
Quoted 5 lines · 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?

Quoted 5 lines

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

Signature · 6 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
I thought my people would grow tired of killing. But you were  right,
they  see it is easier than trading. And it has its pleasures. I feel
it myself. Like the hunt, but with richer rewards.
	-- Apella, "A Private Little War", stardate 4211.8

Rupesh S

author
#0 lore raw

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20030612/e2a22eff/attachment.htm