public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: JerryVanBaren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RFC] mpc8572ds relocatable
Date: Mon, 08 Sep 2008 11:34:07 -0400	[thread overview]
Message-ID: <48C545EF.2040809@ge.com> (raw)
In-Reply-To: <1220862412-16162-1-git-send-email-Ed.Swarthout@freescale.com>

Ed Swarthout wrote:
> Fixes boot crash from bad string pointers in get_table_entry_name
> when flash is erased or differs from current u-boot image.
> 
> Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
> ---
> 
> Fix was pointed out by Peter Tyser in Image.c get_table_entry_name thread.
> 
> This redoes Grant Likey's relocation change, but leaves control to each board.
> This also fixes the "mii dump" command when flash is erased.
> Tested with gcc 4.2
> 
>  board/freescale/mpc8572ds/config.mk  |    1 +
>  board/freescale/mpc8572ds/u-boot.lds |    2 +-
>  2 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/board/freescale/mpc8572ds/config.mk b/board/freescale/mpc8572ds/config.mk
> index 5b32186..8b3651b 100644
> --- a/board/freescale/mpc8572ds/config.mk
> +++ b/board/freescale/mpc8572ds/config.mk
> @@ -30,3 +30,4 @@ endif
>  PLATFORM_CPPFLAGS += -DCONFIG_E500=1
>  PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
>  PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
> +PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
> diff --git a/board/freescale/mpc8572ds/u-boot.lds b/board/freescale/mpc8572ds/u-boot.lds
> index a05ece5..79fb41f 100644
> --- a/board/freescale/mpc8572ds/u-boot.lds
> +++ b/board/freescale/mpc8572ds/u-boot.lds
> @@ -58,7 +58,7 @@ SECTIONS
>    .text      :
>    {
>      *(.text)
> -    *(.fixup)
> +/*  *(.fixup)*/

Please don't (just) comment this out.

Preferably your commit message would have enough information to answer 
the question of why .fixup was removed and no comment in the linker 
control file would be necessary.

In some cases it is worth adding a comment to the code as to why .fixup 
was removed so that someone that doesn't know the background doesn't add 
it back in.  Something like this hand generated pseudo patch:

+/*
+ * Note: The *(.fixup) section is unnecessary because the
+ * CONFIG_RELOC_FIXUP_WORKS method is being used to do the relocation.
+ */

    .text      :
    {
      *(.text)
-    *(.fixup)
      *(.got1)
     } :text


Thanks,
gvb

  reply	other threads:[~2008-09-08 15:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05 16:22 [U-Boot] Image.c get_table_entry_name Swarthout Edward L-SWARTHOU
2008-09-05 17:00 ` Peter Tyser
2008-09-08  8:26   ` [U-Boot] [PATCH RFC] mpc8572ds relocatable Ed Swarthout
2008-09-08 15:34     ` JerryVanBaren [this message]
2008-10-12 22:53     ` Wolfgang Denk
2008-10-12 23:55       ` Graeme Russ
2008-10-13 13:06       ` Joakim Tjernlund
2008-10-14  3:59         ` Swarthout Edward L
2008-10-14  7:58           ` Joakim Tjernlund
2008-10-14  3:58       ` Swarthout Edward L

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=48C545EF.2040809@ge.com \
    --to=gerald.vanbaren@ge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox