[U-Boot] [PATCH v2] 85xx: Move to a common linker script

Wolfgang Denk wd at denx.de
Tue Aug 11 21:58:35 CEST 2009


Dear Kumar Gala,

In message <1249997451-21265-1-git-send-email-galak at kernel.crashing.org> you wrote:
> There are really no differences between all the 85xx linker scripts so
> we can just move to a single common one.  Board code is still able to
> override the common one if need be.

Are you sure there are no differences?

--- board/atum8548/u-boot.lds	2009-07-28 20:27:27.549470982 +0200
+++ board/freescale/mpc8536ds/u-boot.lds	2009-07-28 20:27:27.678455216 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Freescale Semiconductor, Inc.
+ * Copyright 2008 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -23,18 +23,14 @@
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
+PHDRS
   {
-    *(.resetvec)
-  } = 0xffff
+  text PT_LOAD;
+  bss PT_LOAD;
+}
 
-  .bootpg 0xFFFFF000 :
+SECTIONS
   {
-    cpu/mpc85xx/start.o	(.bootpg)
-  } = 0xffff
-
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
   .interp : { *(.interp) }
@@ -61,26 +57,17 @@
   .plt : { *(.plt) }
   .text      :
   {
-    cpu/mpc85xx/start.o	(.text)
-    cpu/mpc85xx/traps.o (.text)
-    cpu/mpc85xx/interrupts.o (.text)
-    cpu/mpc85xx/cpu_init.o (.text)
-    cpu/mpc85xx/cpu.o (.text)
-    cpu/mpc85xx/speed.o (.text)
-    lib_generic/crc32.o (.text)
-    lib_ppc/extable.o (.text)
-    lib_generic/zlib.o (.text)
     *(.text)
     *(.fixup)
     *(.got1)
-   }
+   } :text
     _etext = .;
     PROVIDE (etext = .);
     .rodata    :
    {
     *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
+  } :text
   .fini      : { *(.fini)    } =0
   .ctors     : { *(.ctors)   }
   .dtors     : { *(.dtors)   }
@@ -129,6 +116,18 @@
   . = ALIGN(256);
   __init_end = .;
 
+  .bootpg ADDR(.text) + 0x7f000 :
+  {
+    cpu/mpc85xx/start.o	(.bootpg)
+  } :text = 0xffff
+
+  .resetvec ADDR(.text) + 0x7fffc :
+  {
+    *(.resetvec)
+  } :text = 0xffff
+
+  . = ADDR(.text) + 0x80000;
+
   __bss_start = .;
   .bss (NOLOAD)       :
   {
@@ -136,8 +135,9 @@
    *(.dynbss)
    *(.bss)
    *(COMMON)
+  } :bss
+
    . = ALIGN(4);
-  }
   _end = . ;
   PROVIDE (end = .);
 }


???

Also, you're compressing a lot of different Copyrights into a single
"Copyright 2007-2009 Freescale Semiconductor, Inc.".

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Our business is run on trust.  We trust you will pay in advance.


More information about the U-Boot mailing list