[U-Boot] Fix for overlapping sections?

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

Dear "Larry",
In message F4BA0E7CACFBAC4384DC92F2D5AAB507AB43EA@DSGBURGMAIL001.gburg.drs-ds.master you wrote:
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.
I don't understand what you mean. Why exactly can you not upgrade to a recent version of U-Boot? All it takes to get a current version of U-Boot for the Canyonlands board is to type "./MAKEALL canyonlands".
Best regards,
Wolfgang Denk

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__ = .; }

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:
- 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,
participants (4)
-
Albert ARIBAUD
-
Charles Manning
-
Ciummo, Larry (DS-1)
-
Wolfgang Denk