public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] arm: wrong Relocation and not cleared BSS
Date: Tue, 02 Nov 2010 08:41:06 +0100	[thread overview]
Message-ID: <4CCFC092.3090707@free.fr> (raw)
In-Reply-To: <FF55437E1F14DA4BAEB721A458B6701706FD313427@dbde02.ent.ti.com>

Le 02/11/2010 08:18, V, Aneesh a ?crit :

> Thanks. This helps. I did the .lds change and it seems to be booting
> now.

Good!

> However, I can't still explain my earlier observation because even in
> the absence of this fix .rel.dyn had some content and the offsets
> should have been different if I were to believe objdump.
>
> Do you have any clue?

There were two issues:

First, "older" linkers always emitted input relocation sections with the 
name ".rel.dyn" whereas "newer" linkers emitted them with names of the 
form ".rel*". As our linker files only took ".rel.dyn" to form the 
output section, using newer linkers would produce empty .rel.dyn sections.

Second, a fix to the first issue was RFCed to the list which worked on 
several boards but tx25 would not boot completely. The root cause of 
this second issue is that CONFIG_SYS_NAND_U_BOOT_SIZE in the board 
config file hard-codes the size of the u-boot binary that will be read 
from NAND and put in RAM. When/if u-boot grows in size, this constant 
must be adjusted, and it was not.

What hit you was the first issue for sure, and this explains why 
_rel_dyn_start_ofs and _rel_dyn_end_ofs are identical. What *could* have 
hit you was the second issue *if* your board boots from NAND *and* if 
u-boot grew beyond your CONFIG_SYS_NAND_U_BOOT_SIZE.

BTW, Wolfgang, couldn't this 'constant' be generated once objcopy has 
produced u-boot.bin? A script could 'du' its size, round it up as 
required, and generate a .h with the result so that the SPL would always 
compile with a correct value.

> Best regards,
> Aneesh

Amicalement,
-- 
Albert.

  parent reply	other threads:[~2010-11-02  7:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30 13:08 [U-Boot] arm: wrong Relocation and not cleared BSS Alexander Holler
2010-10-30 13:36 ` Albert ARIBAUD
2010-10-30 13:45   ` Alexander Holler
2010-10-30 13:57     ` Albert ARIBAUD
2010-10-30 14:07       ` Alexander Holler
2010-10-30 14:39       ` Wolfgang Denk
2010-10-30 16:01         ` Albert ARIBAUD
2010-10-30 16:10           ` Wolfgang Denk
2010-10-30 14:37     ` Wolfgang Denk
2010-10-30 14:36   ` Wolfgang Denk
2010-10-31 10:59     ` Alexander Holler
2010-10-31 11:58       ` Wolfgang Denk
2010-10-31 12:21         ` Albert ARIBAUD
2010-10-31 16:18         ` Alexander Holler
2010-10-30 15:00   ` Wolfgang Denk
2010-10-30 17:21     ` Albert ARIBAUD
2010-10-30 18:01       ` Wolfgang Denk
2010-10-31  7:44     ` Heiko Schocher
2010-10-30 15:15   ` Darius Augulis
2010-10-30 16:44     ` Albert ARIBAUD
2010-10-30 20:03     ` Alexander Holler
2010-10-30 20:51       ` Alexander Holler
2010-10-31  7:47         ` Heiko Schocher
2010-11-02  5:39           ` V, Aneesh
2010-11-02  5:58             ` V, Aneesh
2010-11-02  6:32               ` Albert ARIBAUD
2010-11-02  7:18                 ` V, Aneesh
2010-11-02  7:37                   ` [U-Boot] Bad page state in process 'swapper' sywang
2010-11-02  7:44                     ` Albert ARIBAUD
2010-11-02  8:13                       ` sywang
2010-11-02  8:44                         ` Wolfgang Denk
2010-11-02  8:40                     ` Wolfgang Denk
2010-11-03  2:29                       ` sywang
2010-11-02  7:41                   ` Albert ARIBAUD [this message]
2010-11-02  8:53                     ` [U-Boot] arm: wrong Relocation and not cleared BSS V, Aneesh
2010-11-02  9:04                       ` Albert ARIBAUD
2010-10-31  7:43 ` Heiko Schocher

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=4CCFC092.3090707@free.fr \
    --to=albert.aribaud@free.fr \
    --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