powerpc, 8xx: Fixup all 8xx u-boot.lds scripts
[oweals/u-boot.git] / board / LEOX / elpt860 / u-boot.lds
index 45206ca3bd1de0f9acf20fc99592ebc92ff00700..5aaf6b309d8eda7be637e2b352af588d727418fa 100644 (file)
@@ -67,13 +67,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    :