[U-Boot-Users] Relocation of code/data in a dynamic linker absent system.
wd at denx.de
Thu Jun 12 12:00:13 CEST 2003
In message <005e01c33108$6140c540$6706a8c0 at 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
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
> 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).
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
More information about the U-Boot