Merge branch 'master' of git://git.denx.de/u-boot-arm
[oweals/u-boot.git] / arch / powerpc / cpu / mpc85xx / u-boot.lds
index 85042c5254b3fca805ba199f55ae9d5bfee4b7c5..0503dce5ae4345edf6221b8d169720c05c5231e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007-2009 Freescale Semiconductor, Inc.
+ * Copyright 2007-2009, 2011 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
  * MA 02111-1307 USA
  */
 
-#ifndef RESET_VECTOR_ADDRESS
+#include "config.h"    /* CONFIG_BOARDDIR */
+
+#ifdef CONFIG_RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS   CONFIG_RESET_VECTOR_ADDRESS
+#else
 #define RESET_VECTOR_ADDRESS   0xfffffffc
 #endif
 
@@ -54,13 +58,14 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
-    KEEP(*(.got))
     _GOT2_TABLE_ = .;
     KEEP(*(.got2))
+    KEEP(*(.got))
+    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
     _FIXUP_TABLE_ = .;
     KEEP(*(.fixup))
   }
-  __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+  __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
 
   .data    :
@@ -72,9 +77,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       KEEP(*(SORT(.u_boot_list*)));
+  }
 
   . = .;
   __start___ex_table = .;
@@ -120,6 +127,6 @@ SECTIONS
   } :bss
 
   . = ALIGN(4);
-  _end = . ;
+  __bss_end = . ;
   PROVIDE (end = .);
 }