[U-Boot] [RFC PATCH 2/3] net: add phylib implementation

Peter Tyser ptyser at xes-inc.com
Thu Aug 27 17:56:20 CEST 2009


On Thu, 2009-08-27 at 10:38 -0500, Scott Wood wrote:
> On Thu, Aug 27, 2009 at 01:54:47AM -0400, Mike Frysinger wrote:
> > On Thursday 27 August 2009 01:11:32 Stefan Roese wrote:
> > > On Thursday 27 August 2009 03:55:57 Mike Frysinger wrote:
> > > > > +int phy_init(void)
> > > > > +{
> > > > > +	/* Initialize the list */
> > > > > +	INIT_LIST_HEAD(&phy_drvs.list);
> > > >
> > > > does it really need to be dynamic ?  arent there static initializers so
> > > > this can be done in .data ?
> > >
> > > Using static initializers fails on PPC because of the somewhat broken
> > > relocation. So this dynamic implementation is the preferred version, at
> > > least for PPC people.
> > 
> > so the ppc port cant use the .data section at all ?  that doesnt sound correct 
> > to me.
> 
> We can't have initialized pointers in .data without manual runtime fixup. 
> Only .text has relocation information.
> 
> Someone tried to get proper relocation working a while ago, but ran into
> toolchain bugs.  Maybe current toolchains are better...

X-ES's board's in U-Boot fully relocate to SDRAM with the
CONFIG_RELOC_FIXUP_WORKS define and -mrelocatable compiler flag.  This
feature has worked with gcc-4.3.1/binutils-2.18.90 and
gcc-4.2.2/binutils-2.17.50.

Does anyone have a specific example of a toolchain that doesn't work?
It'd be great to get the issue figured out and get rid of all those
gd->reloc_off references that currently litter the code...

Peter



More information about the U-Boot mailing list