All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: u-boot@lists.denx.de
Subject: [U-Boot] [TESTING PATCH] ppc: Relocation test patch
Date: Thu, 17 Sep 2009 14:34:39 +0200	[thread overview]
Message-ID: <OF680476D5.A9D9D259-ONC1257634.00449AC4-C1257634.0045177E@transmode.se> (raw)
In-Reply-To: <20090917101542.BD7B1832E864@gemini.denx.de>

Wolfgang Denk <wd@denx.de> wrote on 17/09/2009 12:15:42:
>
> Dear Joakim Tjernlund,
>
> In message <OFA0E17029.E568D101-ONC1257634.002EFBFD-C1257634.
> 002F97F1 at transmode.se> you wrote:
> >
> > > > One day we can fit the whole relocation table into built-in CPU memory, hopefully
> > > > that will make it possible to make u-boot a true PIC exe
> > >
> > > Why is the former the prerequisite for the latter?
> >
> > Some time ago I looked into making u-boot PIC and I came to the conclusion
> > that one must be able to modify the GOT table before we have relocated to RAM.
> > Perhaps there is another way but didn't see it at the time, maybe there is some
> > "hidden" option to gcc that I missed.
>
> But why has the GOT table to fit "into built-in CPU memory"? When we
> are about to relocate U-Boot to RAM, we already have RAM working. So
> we should also be able to copy the GOT table to RAM and modify it
> there as needed before we use it?

Before you get RAM working there are lots of references to global data and
string literals. These point to their link address so if you have loaded
u-boot at a different address than you link address you have to adjust for
the offset. Hard to do that when GOT is in flash :(

>
> > The main problem are all those string literals, these are in the fixup table
> > and one wants to use printf and friends before relocation to RAM.
>
> Maybe a similar approach is usable here?

Yes, fixups and GOT are the same in this regard.

  reply	other threads:[~2009-09-17 12:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11 22:45 [U-Boot] [TESTING PATCH] ppc: Relocation test patch Peter Tyser
2009-09-14 21:26 ` Wolfgang Denk
2009-09-14 22:54   ` Peter Tyser
2009-09-16 23:20   ` Peter Tyser
2009-09-17  7:06     ` Joakim Tjernlund
2009-09-17  7:50       ` Wolfgang Denk
2009-09-17  8:39         ` Joakim Tjernlund
2009-09-17 10:15           ` Wolfgang Denk
2009-09-17 12:34             ` Joakim Tjernlund [this message]
2009-09-17 12:53               ` Wolfgang Denk
2009-09-17 13:25                 ` Joakim Tjernlund
2009-09-17 21:57                 ` Graeme Russ
2009-09-18  5:44                   ` Joakim Tjernlund
2009-09-17 17:29       ` Peter Tyser
2009-09-18 11:40         ` Joakim Tjernlund
2009-09-18 14:28           ` Peter Tyser
2009-09-18 14:52             ` Joakim Tjernlund
2009-09-18 15:21               ` Peter Tyser
2009-09-18 15:33                 ` Joakim Tjernlund
2009-09-18 16:24                   ` Peter Tyser
2009-09-18 17:21                     ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF680476D5.A9D9D259-ONC1257634.00449AC4-C1257634.0045177E@transmode.se \
    --to=joakim.tjernlund@transmode.se \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.