Okay to change default zImage link/load address?

Mark A. Greer mgreer at mvista.com
Tue Feb 13 06:18:04 EST 2007


On Sat, Feb 10, 2007 at 11:53:31AM +1100, David Gibson wrote:
> On Fri, Feb 09, 2007 at 04:25:33PM -0700, Mark A. Greer wrote:
> > On Fri, Feb 09, 2007 at 04:21:00PM -0700, Mark A. Greer wrote:
> > > On Sat, Feb 10, 2007 at 09:40:10AM +1100, David Gibson wrote:
> > > 
> > > > Note that the zImage is already build -fPIC and capable of relocating
> > > > itself if loaded at an address other than 4MB...
> > > 
> > > That doesn't address the issue.
> > > 
> > > Many firmwares look at the address in the ELF header and that's where
> > > they download it, period.  Right now, that address is 4MB, period.
> > > 4MB doesn't work on some platforms so I'm looking for an acceptable
> > > alternative.
> > 
> > David, if I sounded rude, I didn't mean to.
> 
> No no.  I see your point.
> 
> Hrm... I've already been thinking that we'll need to make the crt0.S
> replaceable by platform.  The same is probably true for the linker
> script.

Looks like objcopy can change the addr for us.  So we could pass a
CONFIG_ value from the Makefile to 'wrapper' and have wrapper run objcopy.
Seems easier than having to make your own linker script just to change
the addr.

Mark



More information about the Linuxppc-dev mailing list