From: Wolfgang Denk Date: Fri, 25 Jul 2008 06:28:15 +0200 Subject: [U-Boot-Users] Changing u-boot relocation scheme In-Reply-To: Your message of "Thu, 24 Jul 2008 15:17:38 +0200." <1216905458.27201.38.camel@localhost.localdomain> Message-ID: <20080725042815.EC87A248CE@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 Kenneth, in message <1216905458.27201.38.camel@localhost.localdomain> you wrote: > > > It is standard, documented by the ABI, and works fine if done > > correctly. We just don't do it correctly yet. > > Well the type of runtime relocation that we do in u-boot is not really > specified in any documentation. What is in the abi is assuming a dynamic > linker and a proper elf file. > > Gcc can be nice and create a fixup table for us if we ask for it but > that is not something that exist in any abi document I ever read. That > also explains why when this reloaction code was initially done we ended > up with the extra fixup code that tries to catch a few pointer that the > GOT table is not containing, nobody know the fixup table even existed > and it sure as hell is not mentioned in the documentation you have to > read the gcc code to understand what the -mrelocatable option really do. Thanks for providing such a friendly explanation that the code I came up is so crappy :-) Anyway - let's fix it, rather than do something that is *completely* non-standard. Thanks. 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 Beware of the Turing Tar-pit in which everything is possible but nothing of interest is easy.