[U-Boot-Users] Compiling relocatable code and DATA for PPC
Wolfgang Denk
wd at denx.de
Wed Mar 24 16:22:21 CET 2004
In message <40619F6F.40605 at iti.fi> you wrote:
> I have been trying to find out right options to configure gcc to produce
> data and code
If this is for U-Boot, why don't you just the pre-configured options?
They work fine.
> relocatable code for mpc5xx. The -fpic -meabi -msdata=eabi -G10000
> does code as relocatable but data is still absolute. -fpic is incompatible
This sounds as if you do not understand what relocatable means. Of
course relocatable code may use absolute addressing. "relocatable" is
different from "position independent".
> I have been using gcc for producing absolute code for PPC many, many years
> but now i have need to load dynamically code for non mmu PPC (mpc555).
What is your environment? U-Boot?
> All examples that i have found uses static addresses. Also using
> google i have not found any answers.
You will either have to use PIC (which is not what U-Boot does), or
use a static link address (which is what U-Boot does for standalone
applications), or use relocatable code that you can (manually)
relocate to a target address of your choice (which is what U-Boot
does for the U-Boot code itself).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
To be is to program.
More information about the U-Boot
mailing list