From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Johansson Date: Thu, 24 Jul 2008 15:17:38 +0200 Subject: [U-Boot-Users] Changing u-boot relocation scheme In-Reply-To: <20080724130105.3EE93248B9@gemini.denx.de> References: <20080724130105.3EE93248B9@gemini.denx.de> Message-ID: <1216905458.27201.38.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2008-07-24 at 15:01 +0200, Wolfgang Denk wrote: > In message you wrote: > > Quite frankly, GOT is also clumsy and even ugly IMHO - it requires a > > lot of special treatment, explicit data definitions and linker > > scripts, and does not work for arbitrary data as we saw above. > > It is standard, documented by the ABI, and works fine if done > correctly. We just don't do it correctly yet. > > Best regards, > > Wolfgang Denk > 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.