From: Luigi 'Comio' Mantellini Date: Sun, 25 May 2008 18:58:08 +0200 Subject: [U-Boot-Users] Command table relocation In-Reply-To: <7f245da80805250642r79326e65p47e1afeffc4e486b@mail.gmail.com> References: <7f245da80805250642r79326e65p47e1afeffc4e486b@mail.gmail.com> Message-ID: <1211734688.5888.14.camel@cassini.comioland> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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