Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections
With recent toolchain versions, some boards would not build because
or errors like this one (here for ocotea board when building with
ELDK 4.2 beta):
ppc_4xx-ld: section .bootpg [fffff000 -> fffff23b] overlaps section .bss [fffee900 -> fffff8ab]
For many boards, the .bss section is big enough that it wraps around
at the end of the address space (0xFFFFFFFF), so the problem will not
be visible unless you use a 64 bit tool chain for development. On
some boards however, changes to the code size (due to different
optimizations) we bail out with section overlaps like above.
The fix is to add the NOLOAD attribute to the .bss and .sbss
sections, telling the linker that .bss does not consume any space in
the image.
Signed-off-by: Wolfgang Denk <wd@denx.de>
diff --git a/board/amcc/acadia/u-boot-nand.lds b/board/amcc/acadia/u-boot-nand.lds
index a5dae0e..27dfe08 100644
--- a/board/amcc/acadia/u-boot-nand.lds
+++ b/board/amcc/acadia/u-boot-nand.lds
@@ -124,7 +124,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/acadia/u-boot.lds b/board/amcc/acadia/u-boot.lds
index b08c999..7dd0bb3 100644
--- a/board/amcc/acadia/u-boot.lds
+++ b/board/amcc/acadia/u-boot.lds
@@ -125,7 +125,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/bamboo/u-boot-nand.lds b/board/amcc/bamboo/u-boot-nand.lds
index a5dae0e..27dfe08 100644
--- a/board/amcc/bamboo/u-boot-nand.lds
+++ b/board/amcc/bamboo/u-boot-nand.lds
@@ -124,7 +124,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/bamboo/u-boot.lds b/board/amcc/bamboo/u-boot.lds
index 0375618..045af28 100644
--- a/board/amcc/bamboo/u-boot.lds
+++ b/board/amcc/bamboo/u-boot.lds
@@ -133,7 +133,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/bubinga/u-boot.lds b/board/amcc/bubinga/u-boot.lds
index b08c999..7dd0bb3 100644
--- a/board/amcc/bubinga/u-boot.lds
+++ b/board/amcc/bubinga/u-boot.lds
@@ -125,7 +125,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/ebony/u-boot.lds b/board/amcc/ebony/u-boot.lds
index e32b030..3a6389c 100644
--- a/board/amcc/ebony/u-boot.lds
+++ b/board/amcc/ebony/u-boot.lds
@@ -132,7 +132,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/katmai/u-boot.lds b/board/amcc/katmai/u-boot.lds
index bf8fc5d..2474146 100644
--- a/board/amcc/katmai/u-boot.lds
+++ b/board/amcc/katmai/u-boot.lds
@@ -129,7 +129,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/kilauea/u-boot-nand.lds b/board/amcc/kilauea/u-boot-nand.lds
index a5dae0e..27dfe08 100644
--- a/board/amcc/kilauea/u-boot-nand.lds
+++ b/board/amcc/kilauea/u-boot-nand.lds
@@ -124,7 +124,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/kilauea/u-boot.lds b/board/amcc/kilauea/u-boot.lds
index 390b3f3..1f7653d 100644
--- a/board/amcc/kilauea/u-boot.lds
+++ b/board/amcc/kilauea/u-boot.lds
@@ -125,7 +125,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/luan/u-boot.lds b/board/amcc/luan/u-boot.lds
index 72ce685..00ca84c 100644
--- a/board/amcc/luan/u-boot.lds
+++ b/board/amcc/luan/u-boot.lds
@@ -132,7 +132,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/makalu/u-boot.lds b/board/amcc/makalu/u-boot.lds
index 390b3f3..1f7653d 100644
--- a/board/amcc/makalu/u-boot.lds
+++ b/board/amcc/makalu/u-boot.lds
@@ -125,7 +125,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/ocotea/u-boot.lds b/board/amcc/ocotea/u-boot.lds
index 0daca70..5f0808d 100644
--- a/board/amcc/ocotea/u-boot.lds
+++ b/board/amcc/ocotea/u-boot.lds
@@ -132,7 +132,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/sequoia/u-boot-nand.lds b/board/amcc/sequoia/u-boot-nand.lds
index cf2e2b5..e0b5113 100644
--- a/board/amcc/sequoia/u-boot-nand.lds
+++ b/board/amcc/sequoia/u-boot-nand.lds
@@ -124,7 +124,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/sequoia/u-boot.lds b/board/amcc/sequoia/u-boot.lds
index a423f98..e140737 100644
--- a/board/amcc/sequoia/u-boot.lds
+++ b/board/amcc/sequoia/u-boot.lds
@@ -130,7 +130,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/taihu/u-boot.lds b/board/amcc/taihu/u-boot.lds
index b08c999..7dd0bb3 100644
--- a/board/amcc/taihu/u-boot.lds
+++ b/board/amcc/taihu/u-boot.lds
@@ -125,7 +125,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/taishan/u-boot.lds b/board/amcc/taishan/u-boot.lds
index b2be352..af4223f 100644
--- a/board/amcc/taishan/u-boot.lds
+++ b/board/amcc/taishan/u-boot.lds
@@ -132,7 +132,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/walnut/u-boot.lds b/board/amcc/walnut/u-boot.lds
index fa75dde..c9a8af8 100644
--- a/board/amcc/walnut/u-boot.lds
+++ b/board/amcc/walnut/u-boot.lds
@@ -126,7 +126,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/yosemite/u-boot.lds b/board/amcc/yosemite/u-boot.lds
index 978319f..855d952 100644
--- a/board/amcc/yosemite/u-boot.lds
+++ b/board/amcc/yosemite/u-boot.lds
@@ -132,7 +132,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
diff --git a/board/amcc/yucca/u-boot.lds b/board/amcc/yucca/u-boot.lds
index c9cf4db..e3e5ce3 100644
--- a/board/amcc/yucca/u-boot.lds
+++ b/board/amcc/yucca/u-boot.lds
@@ -132,7 +132,7 @@
__init_end = .;
__bss_start = .;
- .bss :
+ .bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)