From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Sun, 28 Mar 2010 18:38:47 +1100 Subject: [U-Boot] [RFC][PATCH 00/21] [x86] 'Comming of Age' In-Reply-To: References: <1269516183-9306-1-git-send-email-graeme.russ@gmail.com> <1269618919.3376.20364.camel@localhost.localdomain> <4BAD8A9B.2070302@gmail.com> <4BADF1DB.3010404@gmail.com> Message-ID: <4BAF0787.1050204@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Joakim Tjernlund wrote: > > Graeme Russ wrote on 2010/03/27 12:54:03: >> Joakim Tjernlund wrote: >>> I did a few months ago for MPC83xx and sent it to the list. There was some >>> discussion but in the end it wasn't applied because it was too invasive. >>> PPC is especially bad as it needs to relocate string literals too. >>> >> To implement full relocation, I simply need to add an additional parameter >> to this function which provides the 'link versus load' offset which will >> get applied to the 'load versus run' offset calculation > > Are we talking about the same thing? when you say "does not > need to be loaded at TEXT_BASE" you need something like my LINK_OFF patch, > otherwise I don't see how you can boot out of flash otherwise. > I realise now that we are not talking about the same thing. The x86 port always relocates into (and runs from) RAM. Only a very small stub is run from flash (SDRAM setup and sizing, copy to RAM, process relocation entries etc). This stub can be made fully relocatable while running from Flash (with a few tricks) By adjusting all position dependent code after copying into RAM, LINK_OFF is no longer needed Graeme