]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - nand_spl/board/freescale/mpc8315erdb/u-boot.lds
PowerPC, nand_spl: Add relocation support for -fpic
[karo-tx-uboot.git] / nand_spl / board / freescale / mpc8315erdb / u-boot.lds
index 138e42765f1cd3da89381101e5a2f87feb82e242..f1649f84bd420946aaf6f3678bbff8efda47cec0 100644 (file)
@@ -39,8 +39,10 @@ SECTIONS
                *(.sdata*)
                _GOT2_TABLE_ = .;
                KEEP(*(.got2))
-               __got2_entries = (. - _GOT2_TABLE_) >> 2;
+               KEEP(*(.got))
+               PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
        }
+       __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
 
        . = ALIGN(8);
        __bss_start = .;