On Thu, 24 Jul 2008 19:12:20 +0200
Kenneth Johansson <[EMAIL PROTECTED]> wrote:

> > We could build u-boot as a shared library I guess, but that feels a bit
> > weird...  
> 
> What do you mean by that ? u-boot is already compiled with the -fPIC
> option. 

If that's sufficient, why would you need the -mrelocatable option on
PowerPC?

-fPIC makes the compiler generate position-independent code, which is
necessary but not sufficient in order to get a fully relocatable
binary. The second part of the puzzle is dynamic relocations. Shared
libraries have them, and apparently, PowerPC binaries have them if you
link with -mrelocatable.

Currently u-boot is compiled with -fPIC, so the result is almost fully
relocatable. We work around the lack of dynamic relocations by manually
fixing up a handful of pointers at runtime.

Haavard

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to