[U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

Joakim Tjernlund joakim.tjernlund at transmode.se
Sat Oct 3 17:09:43 CEST 2009


Wolfgang Denk <wd at denx.de> wrote on 03/10/2009 16:28:23:
>
> Dear Peter,
>
> In message <1254577553.23101.14.camel at ptyser-laptop> you wrote:
> >
> > > So how should we proceed? My plan was to merge the "reloc" branch by
> > > the end of next week. Is this still realistic?
> >
> > That plan is realistic.  The executive summary is:
> > The current "reloc" branch works, and is an improvement on U-Boot's
> > previous "semi-reolcation", so we should merge it for this release.
>
> OK, so let's do that.
>
> > There are a few change which would further improve relocation that Jocke
> > and I want to get merged.  Whether these improvements occur in this
> > release or the next is not a big deal to me.
> > 1. Fix relocation of NULL pointers.
> > eg the following code would print the relocation fixup offset instead of
> > the expected NULL.
> >    void weak_fun(void) __attribute__((weak));
> >    printf("weak_fun:%p\n", weak_fun);
> > This was already an issue, so we're not breaking anything in the "reloc"
> > branch
> >
> > 2. Move relocation fixup code to C-code
> >
> > 3. Possibly get true relocation working so that U-Boot could be located
> > anywhere and still execute.
>
> I tend to get all of this (as far as it's available and considered to
> be ready) into this release, so we have it all in one big block.

3. isn't ready and won't be for a while more

1. is just a small fix the the existing asm reloc functions. Pretty much
   ready but needs some linker tweeks it seems. No idea if other
   boards than 85xx also needs a linker tweak or not.

2. is 1 in C and some common supporting asm for ppc. Any idea were
   to put common asm files for ppc? I was hoping I could get away with
   just 83xx and the rest could be done later by interested parties?

I have also done some work to fully relocate the IRQ code so
one can remove the --fixed-r14 flag to gcc for 83xx.



More information about the U-Boot mailing list