[U-Boot] [PATCH] Fix Freescale link scripts for newer GCCs

Matthew L. Creech mlcreech at gmail.com
Thu Jan 8 00:29:54 CET 2009


This addresses the problem described here:

http://lists.denx.de/pipermail/u-boot/2008-December/045029.html

This changes the link scripts of several of the mpcXXX CPUs to include
everything from '.rodata'.  Without this, using a recent
powerpc-linux-gnu toolchain (e.g. from CodeSourcery) to build U-Boot
fails, often producing a multi-GB binary file.


Signed-off-by: Matthew Creech <mlcreech at gmail.com>
---
 mpc5xx/u-boot.lds               |    4 +---
 mpc5xxx/u-boot-customlayout.lds |    4 +---
 mpc5xxx/u-boot.lds              |    4 +---
 mpc8220/u-boot.lds              |    4 +---
 mpc824x/u-boot.lds              |    4 +---
 mpc8260/u-boot.lds              |    4 +---
 mpc83xx/u-boot.lds              |    4 +---
 7 files changed, 7 insertions(+), 21 deletions(-)

diff -purN orig/cpu/mpc5xx/u-boot.lds u-boot/cpu/mpc5xx/u-boot.lds
--- orig/cpu/mpc5xx/u-boot.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc5xx/u-boot.lds	2009-01-07 17:59:25.000000000 -0500
@@ -65,9 +65,7 @@ SECTIONS
   PROVIDE (etext = .);
   .rodata    :
   {
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0
diff -purN orig/cpu/mpc5xxx/u-boot-customlayout.lds
u-boot/cpu/mpc5xxx/u-boot-customlayout.lds
--- orig/cpu/mpc5xxx/u-boot-customlayout.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc5xxx/u-boot-customlayout.lds	2009-01-07
18:00:33.000000000 -0500
@@ -68,9 +68,7 @@ SECTIONS
     *(.fixup)
     *(.got1)
     . = ALIGN(16);
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0
diff -purN orig/cpu/mpc5xxx/u-boot.lds u-boot/cpu/mpc5xxx/u-boot.lds
--- orig/cpu/mpc5xxx/u-boot.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc5xxx/u-boot.lds	2009-01-07 17:59:01.000000000 -0500
@@ -57,9 +57,7 @@ SECTIONS
     *(.fixup)
     *(.got1)
     . = ALIGN(16);
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0
diff -purN orig/cpu/mpc8220/u-boot.lds u-boot/cpu/mpc8220/u-boot.lds
--- orig/cpu/mpc8220/u-boot.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc8220/u-boot.lds	2009-01-07 17:59:41.000000000 -0500
@@ -57,9 +57,7 @@ SECTIONS
     *(.fixup)
     *(.got1)
     . = ALIGN(16);
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0
diff -purN orig/cpu/mpc824x/u-boot.lds u-boot/cpu/mpc824x/u-boot.lds
--- orig/cpu/mpc824x/u-boot.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc824x/u-boot.lds	2009-01-07 17:58:45.000000000 -0500
@@ -57,9 +57,7 @@ SECTIONS
     *(.fixup)
     *(.got1)
     . = ALIGN(16);
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0
diff -purN orig/cpu/mpc8260/u-boot.lds u-boot/cpu/mpc8260/u-boot.lds
--- orig/cpu/mpc8260/u-boot.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc8260/u-boot.lds	2009-01-07 17:58:27.000000000 -0500
@@ -57,9 +57,7 @@ SECTIONS
     *(.fixup)
     *(.got1)
     . = ALIGN(16);
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0
diff -purN orig/cpu/mpc83xx/u-boot.lds u-boot/cpu/mpc83xx/u-boot.lds
--- orig/cpu/mpc83xx/u-boot.lds	2009-01-07 17:57:22.000000000 -0500
+++ u-boot/cpu/mpc83xx/u-boot.lds	2009-01-07 17:58:11.000000000 -0500
@@ -55,9 +55,7 @@ SECTIONS
     *(.fixup)
     *(.got1)
     . = ALIGN(16);
-    *(.rodata)
-    *(.rodata1)
-    *(.rodata.str1.4)
+    *(.rodata*)
     *(.eh_frame)
   }
   .fini      : { *(.fini)    } =0


-- 
Matthew L. Creech


More information about the U-Boot mailing list