All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Tyser <ptyser@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] relocation: Do not relocate NULL pointers.
Date: Mon, 05 Oct 2009 18:20:11 -0500	[thread overview]
Message-ID: <1254784811.24664.968.camel@localhost.localdomain> (raw)
In-Reply-To: <OFC719203E.B96F8807-ONC1257644.00522490-C1257644.005349B9@transmode.se>

Hi Jocke,

> > > 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.

It looks like 85xx is the only arch that needed linker script tweaks.  I
just submitted some patches a bit ago.

> 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?

Assuming the 85xx link script changes are accepted, what's the gameplan
now?  #1 is pretty trivial (the original patch that spawned this thread
with slight tweaks) and should be easy to get in this merge window.
That would get us to the point that relocation is fully functional,
including non-relocation of NULL pointers.

#2 looks more involved and prone to errors as it requires some shuffling
of registers in assembly for all architectures.  Are we aiming for
getting #2 across all architectures in this window?  I should be able to
implement and test it on 85xx, 86xx, and 44x, and Jocke's tested on
83xx.  I don't think I could do the rest of the arches by the end of
this week though.  Any other takers?  Save it for the next merge window?

Best,
Peter

  parent reply	other threads:[~2009-10-05 23:20 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 11:51 [U-Boot] [PATCH] relocation: Do not relocate NULL pointers Joakim Tjernlund
2009-09-23 12:17 ` Peter Tyser
2009-09-23 12:25   ` Stefan Roese
2009-09-23 12:30   ` Joakim Tjernlund
2009-09-23 12:57     ` Peter Tyser
2009-09-23 16:53       ` Joakim Tjernlund
2009-09-23 18:23       ` Wolfgang Denk
2009-09-27 13:15         ` Joakim Tjernlund
2009-09-27 13:52           ` Graeme Russ
2009-09-27 16:18             ` Joakim Tjernlund
2009-09-27 23:23               ` Graeme Russ
2009-09-28  7:28                 ` Joakim Tjernlund
2009-09-28  4:31           ` Peter Tyser
2009-09-28  7:34             ` Joakim Tjernlund
2009-09-28 12:45               ` Peter Tyser
2009-09-28 13:15                 ` Joakim Tjernlund
2009-09-28 14:29                   ` Peter Tyser
2009-09-28 14:47                     ` Joakim Tjernlund
2009-09-28 14:41                 ` Joakim Tjernlund
2009-09-28 15:08                   ` Peter Tyser
2009-09-28 15:23                     ` Joakim Tjernlund
2009-09-28 15:37                       ` Joakim Tjernlund
2009-10-03  8:13                         ` Wolfgang Denk
     [not found]                           ` <OF3474ED49.C18DA041-ONC1257 <20091003142823.F037D832E408@gemini.denx.de>
2009-10-03  9:28                           ` Joakim Tjernlund
2009-10-03 12:13                             ` Wolfgang Denk
2009-10-03 13:34                               ` Joakim Tjernlund
2009-10-03 13:45                               ` Peter Tyser
2009-10-03 14:28                                 ` Wolfgang Denk
2009-10-03 15:09                                   ` Joakim Tjernlund
2009-10-03 19:31                                     ` Wolfgang Denk
2009-10-05 23:20                                     ` Peter Tyser [this message]
2009-10-06  8:58                                       ` Wolfgang Denk
2009-10-06 10:56                                         ` Joakim Tjernlund
2009-10-05 20:07         ` Peter Tyser
2009-10-05 21:18           ` Wolfgang Denk
2009-10-06 17:12             ` Scott Wood
2009-10-06 17:52               ` Wolfgang Denk
2009-09-23 12:24 ` Stefan Roese
2009-09-23 12:33   ` Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2009-10-07 23:42 Joakim Tjernlund
2009-10-07 23:49 ` Peter Tyser
2009-10-08  0:03   ` Joakim Tjernlund
2009-10-08  0:03 Joakim Tjernlund
2009-10-08  7:38 ` Wolfgang Denk
2009-10-08  8:56   ` Joakim Tjernlund
2009-10-08 12:44     ` Wolfgang Denk
2009-10-08 13:35       ` Joakim Tjernlund
2009-10-08 13:40     ` Peter Tyser
2009-10-08 22:16       ` Wolfgang Denk

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=1254784811.24664.968.camel@localhost.localdomain \
    --to=ptyser@xes-inc.com \
    --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.