public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] Fix for overlapping sections?
Date: Wed, 20 Apr 2011 21:31:21 +0200	[thread overview]
Message-ID: <4DAF3489.5090606@aribaud.net> (raw)
In-Reply-To: <201104210703.53223.manningc2@actrix.gen.nz>

Le 20/04/2011 21:03, Charles Manning a ?crit :
> 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__ = .;
>          }

Watch out: these are ARM excerpts. The original problem is on PPC, to 
which these might possibly not apply.

Aside: I understand the stars added because of the -ffunction-section in 
your example, but why the KEEP(), or more specifically, what makes it 
required with -ffunction-section? Unless you assume --gc-sections also?

Amicalement,
-- 
Albert.

      reply	other threads:[~2011-04-20 19:31 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
2011-04-20 19:31   ` Albert ARIBAUD [this message]

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=4DAF3489.5090606@aribaud.net \
    --to=albert.u.boot@aribaud.net \
    --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