[U-Boot-Users] Changing u-boot relocation scheme

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Thu Jul 24 20:32:30 CEST 2008


> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net]
> On Behalf Of vb
> Sent: den 24 juli 2008 20:26
> To: Kenneth Johansson
> Cc: u-boot-users at lists.sourceforge.net; Haavard Skinnemoen; Wolfgang Denk
> Subject: Re: [U-Boot-Users] Changing u-boot relocation scheme
> 
> On Thu, Jul 24, 2008 at 11:09 AM, Kenneth Johansson
> <kenneth at southpole.se> wrote:
> >
> 
> >
> > I have run u-boot with everything compiled with -mrelocatable and normal
> > relocation fixup code removed so I know it works fine. So consider it
> > proven. But since it apparently is a problem in some situation the best
> > is probably to make it a configuration option.
> >
> >
> 
> >From what I saw in my limited experiment, there is no code (as in CPU
> instructions) generated by gcc, just a data section containing
> offsets.
> 
> Maybe the linker is supposed to add some code to the startup file to
> handle that section in case it is invoked with -mrelocatable (on't
> know if it would recognize this an option) or detects .fixup section
> in the .o files being linked. It is a mute point for embedded
> development anyways.
> 
> I *think* the only thing missing is a simple function to scan the
> .fixup table and fix the pointers after relocation.

You don't need that much, just reapply Grants patch(mentioned early in the debate)
that were reverted because it did not work for everyone, probably due to some
other strange relocation scheme. I too have run u-boot with full .fixup applied
and it works. U-boot gets bigger, but that is most likely due to the old reloc code
is just nullified instead of removed.

     Jocke 





More information about the U-Boot mailing list