From: Wolfgang Denk Date: Sun, 03 Oct 2010 20:14:38 +0200 Subject: [U-Boot] ARM relocation, question to Heiko In-Reply-To: <4CA75BFB.5030208@comcast.net> References: <4CA49746.2050301@emk-elektronik.de> <20100930174308.070ECD2B48C@gemini.denx.de> <4CA570D3.9040406@denx.de> <4CA57468.6090702@free.fr> <4CA57762.3000201@denx.de> <4CA5821E.3070108@emk-elektronik.de> <4CA5873B.6040907@free.fr> <4CA590E6.6070701@emk-elektronik.de> <4CA59B89.6090207@denx.de> <4CA5BB7A.8050304@emk-elektronik.de> <20101001105506.A64D41539A0@gemini.denx.de> <4CA5BFEF.3090208@emk-elektronik.de> <20101001112125.4076E153A7E@gemini.denx.de> <4CA5C7DE.6010300@emk-elektronik.de> <20101001115908.A34411539A0@gemini.denx.de> <4CA5D26D.2090505@emk-elektronik.de> <4CA5D857.5010009@emk-elektronik.de> <20101001125502.D0B4E1539A0@gemini.denx.de> <4CA6DC16.5040409@emk-elektronik.de> <4CA6E517.9040701@fr <4CA6F687.1080600@denx.de> <4CA75BFB.5030208@comcast.net> Message-ID: <20101003181438.D0BC51539A0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "J. William Campbell", In message <4CA75BFB.5030208@comcast.net> you wrote: > > >>> And I think there are more places of this type in u-boot... > >> Yes, maybe. But relocation as I did for arm, also works > >> on m68k, sparc, mips, avr32 and they must do also this > >> fixups, so for common functions (except the new env handling, > >> which I think got never tested on this architectures?) should > >> work ... > > This pointer problem is solved with the fixup relocs on ppc and > > should work without manual relocation. I think this is a ppc > > only extension but I might be wrong. > > You are correct that this is a ppc only extension. As such, it is > not a good candidate for "general" use. On contrary. If it works for PPC, then there should be ways to do the same on other architectures. > Using the full relocation scheme eliminates the need for all these > "fixups" in u-boot C code. I think this is a very desirable result. > It is also not clear to me that hard coding in the relocation as several > C routines will produce a u-boot that is "smaller" than the one > produced by using normal ELF relocation. However, using full relocation > creates an environment that is true "C" and does not rely on people > remembering that they may have to fix up some parts of their code. It is > hard to see much downside in using the full relocation capability > provided by Graeme's code. Agreed. But if we take this path, we need to find an implementation that looks clean and readable. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Overflow on /dev/null, please empty the bit bucket.