[U-Boot-Users] Command table relocation

Luigi 'Comio' Mantellini luigi.mantellini at idf-hit.com
Sun May 25 18:58:08 CEST 2008


Hi Nanda,

the command table is (essentially) a vector of pointers to functions
(the commands). These pointers are calculated using the TEXTBASE pointer
that usually is located into the flash. When relocate the u-boot code,
we need to update the commands table with the relocated pointer for e
each command in order to use the RAM relocated version of them instead
the ROM original copy.

This relocation should be avoided if the relocation offset was known a
compilation time... in many board/cpu this is theoretically feasible.

Best regards,

luigi 


Il giorno dom, 25/05/2008 alle 19.12 +0530, Chetan Nanda ha scritto: 

> Hi All,
> 
> In u-boot code (in board.c file) there is a comment which goes like this:
> 
>       /*
>          * We have to relocate the command table manually
>          */
> 
> Why we need to relocate the code for command table separately?
> Does command table code not linked with rest of the code?
> And where is the linker script that is being used while linking?
> 
> Thanks,
> Chetan Nanda
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080525/c9f6ef33/attachment.htm 


More information about the U-Boot mailing list