On 10/3/2010 11:14 AM, Wolfgang Denk wrote: > Dear "J. William Campbell", > > In message<4ca75bfb.5030...@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. > Well, maybe so, but GCC won't do it now, and there has been no move by other architectures to adopt this capability. I suspect that it is extremely unlikley that this capability will ever be ported to other architectures since it has been available for so long on PPC without any movement to other systems.
>> 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. Agreed. This should be possible to do now that there is a better understanding of the ELF format by the u-boot community. Perhaps the place to start would be trying to port what Graeme has done to ARM or perhaps better yet, PPC. Since lots of people on this list are PPC folks, we should have a lot of leverage there. Best Regards, Bill Campbell > > Best regards, > > Wolfgang Denk > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot