public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Charles Manning <manningc2@actrix.gen.nz>
To: u-boot@lists.denx.de
Subject: [U-Boot] Fix for overlapping sections?
Date: Thu, 21 Apr 2011 07:03:53 +1200	[thread overview]
Message-ID: <201104210703.53223.manningc2@actrix.gen.nz> (raw)
In-Reply-To: <F4BA0E7CACFBAC4384DC92F2D5AAB507AB43EA@DSGBURGMAIL001.gburg.drs-ds.master>

On Tuesday 19 April 2011 11:20:47 Ciummo, Larry (DS-1) wrote:
> Designation: Non-SSA/Finmeccanica
>
> A while back there was a fix for the overlapping section link problem
> (see below) involving changing some sort of global.  Does anyone have a
> pointer to the change.  I'm using a fairly old uboot for AMCC
> Canyonlands/460Ex and can't easily upgrade to a newer uboot build.
>
> Thanks
> Larry
>
> eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/pic -lgcc -Map u-boot.map -o
> u-boot
> /opt/eldk/usr/bin/ppc_4xx-ld: section .bootpg [fffff000 -> fffff303]
> overlaps section .data.rel.local [ffffe1d8 -> fffffebb]
> /opt/eldk/usr/bin/ppc_4xx-ld: u-boot: section .bootpg lma 0xfffff000
> overlaps previous sections
> /opt/eldk/usr/bin/ppc_4xx-ld: u-boot: section .u_boot_cmd lma 0xfffffebc
> overlaps previous sections
> make: *** [u-boot] Error 1

Overlapping sections are commonly caused by one of two problems:
1) You have set up the memory map in a way that does not give enough space so 
the sections do indeed overlap.
2) Your ld script is not handling all the sections being fed to it. This is  
likely if you have switched to  using -ffunction-sections etc.

In the case of (2) you will need to modify your ld script with something like:
@@ -34,8 +34,8 @@ SECTIONS
        . = ALIGN(4);
        .text   :
        {
-               arch/arm/cpu/armv7/start.o      (.text)
-               *(.text)
+               KEEP(arch/arm/cpu/armv7/start.o (.text*))
+               *(.text*)
        }
 
        . = ALIGN(4);
@@ -70,7 +70,7 @@ SECTIONS
 
        .bss __rel_dyn_start (OVERLAY) : {
                __bss_start = .;
-               *(.bss)
+               *(.bss*)
                 . = ALIGN(4);
                __bss_end__ = .;
        }

  parent reply	other threads:[~2011-04-20 19:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 23:20 [U-Boot] Fix for overlapping sections? Ciummo, Larry
2011-04-20  6:42 ` Wolfgang Denk
     [not found]   ` <F4BA0E7CACFBAC4384DC92F2D5AAB507B1165B@DSGBURGMAIL001.gburg.drs-ds.master>
2011-04-25 17:21     ` Wolfgang Denk
2011-04-20 19:03 ` Charles Manning [this message]
2011-04-20 19:31   ` Albert ARIBAUD

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=201104210703.53223.manningc2@actrix.gen.nz \
    --to=manningc2@actrix.gen.nz \
    --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